Check that we have a valid exe before calling ecore_exe_free. See bug #122

for more information.
Fix some formatting issues.


SVN revision: 31093
This commit is contained in:
Christopher Michael 2007-07-30 19:37:30 +00:00
parent 9bdd051457
commit fde266b92a
1 changed files with 6 additions and 6 deletions

View File

@ -118,7 +118,8 @@ e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec,
launch->zone = zone; launch->zone = zone;
e_object_ref(E_OBJECT(launch->zone)); e_object_ref(E_OBJECT(launch->zone));
} }
if (launch_method) launch->launch_method = evas_stringshare_add(launch_method); if (launch_method)
launch->launch_method = evas_stringshare_add(launch_method);
if (desktop) if (desktop)
{ {
@ -128,9 +129,7 @@ e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec,
efreet_desktop_command_get(desktop, files, _e_exec_cb_exec, launch); efreet_desktop_command_get(desktop, files, _e_exec_cb_exec, launch);
} }
else else
{
_e_exec_cb_exec(launch, NULL, strdup(exec), 0); _e_exec_cb_exec(launch, NULL, strdup(exec), 0);
}
return 1; return 1;
} }
@ -260,8 +259,9 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
} }
e_exec_start_pending = evas_list_append(e_exec_start_pending, desktop); e_exec_start_pending = evas_list_append(e_exec_start_pending, desktop);
} }
else else if (exe)
ecore_exe_free(exe); ecore_exe_free(exe);
if (!remaining) if (!remaining)
{ {
if (launch->launch_method) evas_stringshare_del(launch->launch_method); if (launch->launch_method) evas_stringshare_del(launch->launch_method);