[Bf-blender-cvs] [299859e] strand_editmode: Sanity check: if there is no edited/active object for an undo step, consider it invalid and clean up.

Lukas Tönne noreply at git.blender.org
Mon Apr 20 14:24:25 CEST 2015


Commit: 299859e40b2f9652ded56863e293c104705dbfb7
Author: Lukas Tönne
Date:   Fri Jan 30 09:36:04 2015 +0100
Branches: strand_editmode
https://developer.blender.org/rB299859e40b2f9652ded56863e293c104705dbfb7

Sanity check: if there is no edited/active object for an undo step,
consider it invalid and clean up.

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

M	source/blender/editors/util/editmode_undo.c

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

diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c
index 06bcbd2..7c4db69 100644
--- a/source/blender/editors/util/editmode_undo.c
+++ b/source/blender/editors/util/editmode_undo.c
@@ -208,7 +208,7 @@ static void undo_clean_stack(bContext *C)
 		next = uel->next;
 		
 		/* for when objects are converted, renamed, or global undo changes pointers... */
-		if (uel->type == obedit->type) {
+		if (obedit && uel->type == obedit->type) {
 			if (STREQ(uel->id.name, obedit->id.name)) {
 				if (uel->validate_undo == NULL)
 					is_valid = true;




More information about the Bf-blender-cvs mailing list