py/rna api crash fix: getting event.ascii would crash blender (strange nobody noticed...
authorCampbell Barton <ideasman42@gmail.com>
Sun, 23 Oct 2011 06:56:39 +0000 (06:56 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 23 Oct 2011 06:56:39 +0000 (06:56 +0000)
source/blender/makesrna/intern/rna_wm.c

index 676fe1e..594b0ab 100644 (file)
@@ -460,14 +460,14 @@ static PointerRNA rna_OperatorMacro_properties_get(PointerRNA *ptr)
 
 static void rna_Event_ascii_get(PointerRNA *ptr, char *value)
 {
-       wmEvent *event= (wmEvent*)ptr->id.data;
+       wmEvent *event= (wmEvent*)ptr->data;
        value[0]= event->ascii;
        value[1]= '\0';
 }
 
 static int rna_Event_ascii_length(PointerRNA *ptr)
 {
-       wmEvent *event= (wmEvent*)ptr->id.data;
+       wmEvent *event= (wmEvent*)ptr->data;
        return (event->ascii)? 1 : 0;
 }