Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-28 20:11:06 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-28 20:11:06 +0400
commite6078c7417995b904f7513959a6da599cafb5848 (patch)
tree6e8ed539bfb96759c2ebf7965b93f597f36b14ee
parentfde83cb75b340acfb4bcb738714d5a4395406737 (diff)
Fix potential crash for file operators that don't define
a "path" property, now it will just give a warning.
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 846309f1265..b7156a17383 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -943,7 +943,7 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
/* XXX also extension code in image-save doesnt work for this yet */
if(strncmp(handler->op->type->name, "Save", 4)==0) {
/* this gives ownership to pupmenu */
- uiPupMenuSaveOver(C, handler->op, path);
+ uiPupMenuSaveOver(C, handler->op, (path)? path: "");
}
else {
int retval= handler->op->type->exec(C, handler->op);
@@ -961,7 +961,8 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
WM_operator_free(handler->op);
wm_event_free_handler(handler);
- MEM_freeN(path);
+ if(path)
+ MEM_freeN(path);
action= WM_HANDLER_BREAK;
}