diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2016-07-22 18:13:23 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2016-07-22 18:13:23 +0300 |
commit | 7ca4cf2be59f52de4b2a622c358fca1f002806d1 (patch) | |
tree | 16233a8225143332cbcce4dd18e37b6eaadd0ed9 /source | |
parent | 9c6387808590f8ea65f37bba17f3683c62ec0722 (diff) |
Fix crash using ID remapping on invalid ID pairs
Missing NULL checks caused crash in BKE_reportf formatting.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_edit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index b0cd3aabbfd..3c47f542dae 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; } |