fix for a crash with the following steps.
[blender-staging.git] / source / blender / editors / space_file / filelist.c
index f815c7b4ac5c091956981c57a1e58695f7f9d600..0a8ae56c29198516d6e3d1f65dd5b534f7ecaffb 100644 (file)
@@ -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)