task_switcher: add variable verification. 18/37618/1 accepted/tizen/common/20150403.125835 accepted/tizen/mobile/20150402.123451 accepted/tizen/tv/20150402.122609 accepted/tizen/wearable/20150402.123001 submit/tizen/20150401.105206
authorMichelle Legrand <legrand.michelle@outlook.com>
Tue, 3 Mar 2015 09:17:02 +0000 (10:17 +0100)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Wed, 1 Apr 2015 08:25:07 +0000 (17:25 +0900)
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

Change-Id: I55ce510f798f6349a7b7d8132f884cd5a2b715c1
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
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;
      }