Fix a crash issue
[platform/core/api/vine.git] / src / vine-disc.cpp
index cc994ff..8d092bd 100755 (executable)
@@ -298,7 +298,7 @@ void __vine_disc_epoll_handler(int fd, int events, void *user_data)
 {
        VINE_LOGD("Process event for fd[%d] events[%d] disc_handle[%p]", fd, events, user_data);
        vine_disc_s *disc_handle = (vine_disc_s *)user_data;
-       if (disc_handle->plugin_fn->process_event == NULL) {
+       if (!disc_handle || !disc_handle->plugin_fn || disc_handle->plugin_fn->process_event == NULL) {
                VINE_LOGE("No process_event() defined");
                return;
        }