do not segv on executables that return non-zero.

if an executable returns non-zero a dialog will be present with
information, if it was a .desktop file, then it would use the "Name"
field to name the log and all.

However, the .desktop reference was deleted and the dialog would use a
bogus pointer. Now we take a reference insidethe dialog and just
release it on dialog deletion.

Found by manio, fix by me.



SVN revision: 40987
devs/princeamd/enlightenment-0.17-elive
Gustavo Sverzut Barbieri 14 years ago
parent 86de810935
commit f6af66808f
  1. 3
      src/bin/e_exec.c

@ -402,6 +402,7 @@ _e_exec_error_dialog(Efreet_Desktop *desktop, const char *exec, Ecore_Exe_Event_
return;
}
cfdata->desktop = desktop;
if (cfdata->desktop) efreet_desktop_ref(cfdata->desktop);
if (exec) cfdata->exec = strdup(exec);
cfdata->error = error;
cfdata->read = read;
@ -508,6 +509,8 @@ _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
if (cfdata->error) ecore_exe_event_data_free(cfdata->error);
if (cfdata->read) ecore_exe_event_data_free(cfdata->read);
if (cfdata->desktop) efreet_desktop_free(cfdata->desktop);
E_FREE(cfdata->exec);
E_FREE(cfdata->signal);
E_FREE(cfdata->exit);

Loading…
Cancel
Save