[Bf-blender-cvs] [689241b] master: Fix for potential null-pointer-dereference if the new action is NULL

Joshua Leung noreply at git.blender.org
Mon Apr 20 07:29:32 CEST 2015


Commit: 689241b6e5d962c14a6650082fc0ecf4a3a0aa5e
Author: Joshua Leung
Date:   Mon Apr 20 12:30:29 2015 +1200
Branches: master
https://developer.blender.org/rB689241b6e5d962c14a6650082fc0ecf4a3a0aa5e

Fix for potential null-pointer-dereference if the new action is NULL

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

M	source/blender/makesrna/intern/rna_space.c

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

diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 300752d..0c94575 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1237,7 +1237,7 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *UNUSED(bmain), Scene *s
 					
 					/* Assign new action, and adjust the usercounts accordingly */
 					adt->action = saction->action;
-					id_us_plus(&adt->action->id);
+					id_us_plus((ID *)adt->action);
 				}
 				else {
 					/* fix id-count of action we're replacing */
@@ -1247,7 +1247,7 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *UNUSED(bmain), Scene *s
 					
 					/* Assign new action, and adjust the usercounts accordingly */
 					adt->action = saction->action;
-					id_us_plus(&adt->action->id);
+					id_us_plus((ID *)adt->action);
 				}
 			}




More information about the Bf-blender-cvs mailing list