task_switcher: add variable verification.
authorMichelle Legrand <legrand.michelle@outlook.com>
Tue, 3 Mar 2015 09:17:02 +0000 (10:17 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Thu, 26 Mar 2015 17:17:37 +0000 (18:17 +0100)
Summary:
If dbus is not installed the task switcher raise a segmentation error.
So we check if the returned variable by eo_do is not null before continuing.

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
legacy/elementary/src/bin/test_task_switcher.c

index a0e14dd..ff7d7e4 100644 (file)
@@ -300,6 +300,8 @@ _app_open(const char *package)
         const char *app_package = NULL;
 
         eo_do(app, app_package = elm_app_client_package_get());
+        if (!app_package)
+          return;
         if (!strcmp(package, app_package))
           return;
      }