py/rna api crash fix: getting event.ascii would crash blender (strange nobody noticed...
[blender.git] / source / blender / makesrna / intern / rna_wm.c
index 676fe1e092df6a26142b28a615e5f8fa5e9ba096..594b0abb93d23beb2eb79c0149bed82a56a061a2 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;
 }