ctxpopup: Fixed crashed when sd->parent is null after 9c3d78b.
authorRyuan Choi <ryuan.choi@gmail.com>
Sun, 7 Apr 2013 13:47:48 +0000 (22:47 +0900)
committerDaniel Juyung Seo <seojuyung@gmail.com>
Sun, 7 Apr 2013 13:47:48 +0000 (22:47 +0900)
legacy/elementary/src/lib/elc_ctxpopup.c

index 2662a01..5f7dcbe 100644 (file)
@@ -164,7 +164,7 @@ _base_geometry_calc(Evas_Object *obj,
    evas_object_geometry_get
      (sd->parent, &hover_area.x, &hover_area.y, &hover_area.w,
      &hover_area.h);
-   if (!strcmp(evas_object_type_get(sd->parent), "elm_win"))
+   if (sd->parent && !strcmp(evas_object_type_get(sd->parent), "elm_win"))
      hover_area.x = hover_area.y = 0;
 
    evas_object_geometry_get(obj, &pos.x, &pos.y, NULL, NULL);