Fix Prevent CID: 436450 - Null pointer dereference
authorShinwoo Kim <cinoo.kim@samsung.com>
Tue, 9 Jun 2015 01:42:36 +0000 (10:42 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Tue, 9 Jun 2015 01:42:36 +0000 (10:42 +0900)
Change-Id: I40cd7f677d2b5d84ae0ef97a7310033c634cab9c

src/app_tracker.c

index 60fee16..e508637 100644 (file)
@@ -72,13 +72,17 @@ static void
 _on_atspi_event_cb(const AtspiEvent *event)
 {
    DEBUG("START");
-   DEBUG("signal:%s", event->type);
-   if (!event->source)
-      ERROR("empty event source");
    GList *l;
    SubTreeRootData *std;
 
-   if (!event || !event->source) return;
+   if (!event) return;
+   if (!event->source)
+      {
+         ERROR("empty event source");
+         return;
+      }
+
+   DEBUG("signal:%s", event->type);
 
    for (l = _roots; l != NULL; l = l->next)
       {