diff options
author | Ton Roosendaal <ton@blender.org> | 2009-02-17 19:33:08 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-02-17 19:33:08 +0300 |
commit | 9aa7e981bde5ad1b6f798ef5048cc4c373d09eb2 (patch) | |
tree | 7aa767c7988a6eb0371729b6e7720b67ebb59d27 | |
parent | 9322bddf2c8997adafe3474e50bbb2eab7ab2076 (diff) |
2.5
Bug: cleanup in space_file copy I did missed a NULL check :)
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index c73c6e7b6a9..48f501f0173 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -142,12 +142,14 @@ static SpaceLink *file_duplicate(SpaceLink *sl) /* clear or remove stuff from old */ sfilen->op = NULL; /* file window doesn't own operators */ - sfilen->params= MEM_dupallocN(sfileo->params); - sfilen->files = filelist_new(); - filelist_setdir(sfilen->files, sfilen->params->dir); - filelist_settype(sfilen->files, sfilen->params->type); - + + if(sfileo->params) { + sfilen->params= MEM_dupallocN(sfileo->params); + + filelist_setdir(sfilen->files, sfilen->params->dir); + filelist_settype(sfilen->files, sfilen->params->type); + } return (SpaceLink *)sfilen; } |