Fixed SEGV on removing script when no script is currently loaded in the editor

This commit is contained in:
Jesse van den Kieboom 2005-11-15 11:56:07 +00:00
parent 2f46f14ae2
commit 22c8dc473d
1 changed files with 2 additions and 1 deletions

View File

@ -896,7 +896,8 @@ on_gm_scripts_dialog_script_removed(GmScripts *scripts, GmScript *script,
gm_scripts_dialog_tree_remove_script(script);
gm_scripts_dialog_remove_file(script);
if (strcmp(script->filename, scripts_dialog->current_edit) == 0) {
if (scripts_dialog->current_edit &&
strcmp(script->filename, scripts_dialog->current_edit) == 0) {
gm_scripts_dialog_editor_load(NULL);
}
}