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);
                                }
                        }

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

Reply via email to