Commit: 7ca4cf2be59f52de4b2a622c358fca1f002806d1
Author: Julian Eisel
Date:   Fri Jul 22 17:13:23 2016 +0200
Branches: master
https://developer.blender.org/rB7ca4cf2be59f52de4b2a622c358fca1f002806d1

Fix crash using ID remapping on invalid ID pairs

Missing NULL checks caused crash in BKE_reportf formatting.

===================================================================

M       source/blender/editors/space_outliner/outliner_edit.c

===================================================================

diff --git a/source/blender/editors/space_outliner/outliner_edit.c 
b/source/blender/editors/space_outliner/outliner_edit.c
index b0cd3aa..3c47f54 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -417,9 +417,9 @@ static int outliner_id_remap_exec(bContext *C, wmOperator 
*op)
                return OPERATOR_CANCELLED;
        }
 
-       if (!(old_id && (old_id != new_id) && (GS(old_id->name) == 
GS(new_id->name)))) {
+       if (!(old_id && new_id && (old_id != new_id) && (GS(old_id->name) == 
GS(new_id->name)))) {
                BKE_reportf(op->reports, RPT_ERROR_INVALID_INPUT, "Invalid 
old/new ID pair ('%s' / '%s')",
-                           old_id->name, new_id->name);
+                           old_id ? old_id->name : "Invalid ID", new_id ? 
new_id->name : "Invalid ID");
                return OPERATOR_CANCELLED;
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to