example: add missing check of thread run 37/64337/1
authorGwanglim Lee <gl77.lee@samsung.com>
Thu, 31 Mar 2016 12:58:03 +0000 (21:58 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Thu, 31 Mar 2016 12:58:03 +0000 (21:58 +0900)
Change-Id: Iedeeb31dab52f1122b6c74491e667604025dfc7f

src/examples/thread_sample.c

index 41f711f3133f36ae1817426bb0ea2fb36519e45d..e1404ee3ea4f1ddc74be85de6510cf6d61026b26 100644 (file)
@@ -94,6 +94,11 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
    evas_object_show(button);
 
    thread = ecore_thread_feedback_run(thread_run_cb, thread_feedback_cb, NULL, NULL, button, EINA_FALSE);
+   if (!thread)
+     {
+        fprintf(stderr, "failed to launch a thread\n");
+        return -1;
+     }
 
    elm_run();
    elm_shutdown();