Fixed SEGV on removing script when no script is currently loaded in the editor
This commit is contained in:
parent
2f46f14ae2
commit
22c8dc473d
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue