Enlightenment CVS committal

Author  : handyande
Project : misc
Module  : engage

Dir     : misc/engage/src


Modified Files:
        icon.c 


Log Message:
Fix possible seg if icon has no exe
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/icon.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- icon.c      2 Jan 2005 22:54:53 -0000       1.42
+++ icon.c      15 Mar 2005 22:02:59 -0000      1.43
@@ -37,7 +37,8 @@
 
   ret = od_icon_new(app, name_override, class_override, application_link);
 
-  ret->data.applnk.command = strdup(app->exe);
+  if (app->exe)
+    ret->data.applnk.command = strdup(app->exe);
   if (app->win_class)
     ret->data.applnk.winclass = strdup(class_override? class_override : 
app->win_class);
   ret->data.applnk.count = 0;
@@ -419,8 +420,11 @@
     if (!strcmp(emission, "engage,app,open")) {
       switch (icon->type) {
       case application_link:
-        edje_object_signal_emit(obj, "engage,app,open,ok", "");
-        ecore_exe_run(icon->data.applnk.command, NULL);
+        if (icon->data.applnk.command) {
+          edje_object_signal_emit(obj, "engage,app,open,ok", "");
+          ecore_exe_run(icon->data.applnk.command, NULL);
+        } else
+          printf("ERROR: no command stored in icon\n");
         break;
       case minimised_window:
         break;




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to