Enlightenment CVS committal
Author : devilhorns
Project : e_modules
Module : screenshot
Dir : e_modules/screenshot
Modified Files:
e_mod_main.c
Log Message:
Fix segfault with ecore_exe_run when taking screenshot.
===================================================================
RCS file: /cvs/e/e_modules/screenshot/e_mod_main.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -3 -r1.69 -r1.70
--- e_mod_main.c 30 Dec 2006 23:34:00 -0000 1.69
+++ e_mod_main.c 22 Jan 2007 21:09:47 -0000 1.70
@@ -615,16 +615,12 @@
Config_Item *ci;
char buf[4096];
- ev = event;
- if (!ev->exe)
- return 1;
- x = ev->exe;
- if (!x)
- return 1;
-
- inst = ecore_exe_data_get (x);
- x = NULL;
- inst->exe = NULL;
+ ev = event;
+ if (!ev->exe) return 1;
+ inst = data;
+ if (ev->exe != inst->exe) return 1;
+ if (inst->exe) inst->exe = NULL;
+
if (inst->filename)
evas_stringshare_del (inst->filename);
if (ss_config->exe_exit_handler)
@@ -633,8 +629,9 @@
ci = _ss_config_item_get (inst->gcc->id);
if ((ci->use_app) && (ci->app != NULL))
{
- snprintf (buf, sizeof (buf), "%s %s", ci->app, inst->filename);
- x = ecore_exe_run (buf, NULL);
+ snprintf (buf, sizeof (buf), "%s %s", ci->app, inst->filename);
+ x = ecore_exe_run (buf, NULL);
+ if (x) ecore_exe_free(x);
}
return 0;
}
@@ -682,8 +679,6 @@
snprintf (buf, sizeof (buf), "%s %s %s/%s", cmd, opt, ci->location,
inst->filename);
- ss_config->exe_exit_handler =
- ecore_event_handler_add (ECORE_EXE_EVENT_DEL, _ss_exe_cb_exit, NULL);
if (ci->delay_time > 0)
{
msg = malloc (sizeof (Edje_Message_Int_Set) + 1 * sizeof (int));
@@ -694,6 +689,8 @@
free (msg);
msg = NULL;
}
+ ss_config->exe_exit_handler =
+ ecore_event_handler_add (ECORE_EXE_EVENT_DEL, _ss_exe_cb_exit, inst);
inst->exe = ecore_exe_run (buf, inst);
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs