diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-31 07:52:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-31 07:52:07 +0400 |
commit | 33b1717d59332e079c0286c89418b06dea39299c (patch) | |
tree | cb7d5dd618e58456f49d2b45b5b35cd2ecfaffa0 /source/blender/editors/space_file | |
parent | 39ef41a0223dd45d97fda022269fa61357e78a79 (diff) |
fix [#29734] Crash after bpy.ops.file.direrectory_new()
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/filesel.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 65473bde0d1..1d629ad6dea 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -667,9 +667,13 @@ void autocomplete_file(struct bContext *C, char *str, void *UNUSED(arg_v)) void ED_fileselect_clear(struct bContext *C, struct SpaceFile *sfile) { - thumbnails_stop(sfile->files, C); - filelist_freelib(sfile->files); - filelist_free(sfile->files); + /* only NULL in rare cases - [#29734] */ + if (sfile->files) { + thumbnails_stop(sfile->files, C); + filelist_freelib(sfile->files); + filelist_free(sfile->files); + } + sfile->params->active_file = -1; WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL); } |