fix for a crash with the following steps.
[blender-staging.git] / source / blender / editors / space_file / filesel.c
index 04fe2ebf828d76b6f14f9e4c3d48ce1903eee0f5..968953abf62e9ab0f4706f32da0b2d27e2660a2a 100644 (file)
@@ -655,9 +655,10 @@ void ED_fileselect_clear(struct bContext *C, struct SpaceFile *sfile)
 void ED_fileselect_exit(struct bContext *C, struct SpaceFile *sfile)
 {
        if(!sfile) return;
-       if(sfile->op)
+       if(sfile->op) {
                WM_event_fileselect_event(C, sfile->op, EVT_FILESELECT_EXTERNAL_CANCEL);
-       sfile->op = NULL;
+               sfile->op = NULL;
+       }
 
        folderlist_free(sfile->folders_prev);
        folderlist_free(sfile->folders_next);