diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_file/filesel.c | 5 |
4 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index a0a2ede11ef..e942cfc8b1f 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1133,7 +1133,10 @@ void ED_area_exit(bContext *C, ScrArea *sa) ARegion *ar; if (sa->spacetype == SPACE_FILE) { - ED_fileselect_exit(C, (SpaceFile*)(sa) ? sa->spacedata.first : CTX_wm_space_data(C)); + SpaceLink *sl= sa->spacedata.first; + if(sl && sl->spacetype == SPACE_FILE) { + ED_fileselect_exit(C, (SpaceFile *)sl); + } } CTX_wm_area_set(C, sa); diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 4eddeaaaf9f..5d786c1d00b 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -854,7 +854,7 @@ int file_next_exec(bContext *C, wmOperator *UNUSED(unused)) folderlist_pushdir(sfile->folders_prev, sfile->params->dir); folderlist_popdir(sfile->folders_next, sfile->params->dir); - // update folder_prev so we can check for it in folderlist_clear_next() + // update folders_prev so we can check for it in folderlist_clear_next() folderlist_pushdir(sfile->folders_prev, sfile->params->dir); file_change_dir(C, 1); diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index f815c7b4ac5..0a8ae56c291 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -469,13 +469,12 @@ int folderlist_clear_next(struct SpaceFile *sfile) /* not listbase itself */ void folderlist_free(ListBase* folderlist) { - FolderList *folder; if (folderlist){ + FolderList *folder; for(folder= folderlist->first; folder; folder= folder->next) MEM_freeN(folder->foldername); BLI_freelistN(folderlist); } - folderlist= NULL; } ListBase *folderlist_duplicate(ListBase* folderlist) diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 04fe2ebf828..968953abf62 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -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); |