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
This commit is contained in:
Gustavo Sverzut Barbieri 2009-06-09 16:45:59 +00:00
parent 86de810935
commit f6af66808f
1 changed files with 3 additions and 0 deletions

View File

@ -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);