fixes for warnings and crashes during doc generation
authorCampbell Barton <ideasman42@gmail.com>
Wed, 14 Oct 2009 18:48:19 +0000 (18:48 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 14 Oct 2009 18:48:19 +0000 (18:48 +0000)
source/blender/blenkernel/intern/context.c
source/blender/makesrna/intern/rna_fcurve.c
source/blender/makesrna/intern/rna_rna.c
source/blender/makesrna/intern/rna_userdef.c

index bbfe077c15ece69c67ca83fd7810b0ba0973b626..d5cc31d918ace6c0a9ad9698b366f48d0331705e 100644 (file)
@@ -441,7 +441,7 @@ static void *ctx_data_pointer_get(const bContext *C, const char *member)
 {
        bContextDataResult result;
 
-       if(ctx_data_get((bContext*)C, member, &result))
+       if(C && ctx_data_get((bContext*)C, member, &result))
                return result.ptr.data;
 
        return NULL;
index 271964bb4837b1f37c0000dc4c09e286018da799..e69e2cd0e2c7a37c458fa04dfa18a55e501beb10 100644 (file)
@@ -53,6 +53,8 @@ EnumPropertyItem fmodifier_type_items[] = {
 
 #ifdef RNA_RUNTIME
 
+#include "WM_api.h"
+
 static StructRNA *rna_FModifierType_refine(struct PointerRNA *ptr)
 {
        FModifier *fcm= (FModifier *)ptr->data;
index 8dd751cd26a32a6de3b193bb808f3b758b1e64be..fbb24f9ada9e8340617996ce2ca129952be360e2 100644 (file)
@@ -383,14 +383,13 @@ static void rna_Property_description_get(PointerRNA *ptr, char *value)
 {
        PropertyRNA *prop= (PropertyRNA*)ptr->data;
        rna_idproperty_check(&prop, ptr);
-       strcpy(value, prop->description);
+       strcpy(value, prop->description ? prop->description:"");
 }
-
 static int rna_Property_description_length(PointerRNA *ptr)
 {
        PropertyRNA *prop= (PropertyRNA*)ptr->data;
        rna_idproperty_check(&prop, ptr);
-       return strlen(prop->description);
+       return prop->description ? strlen(prop->description) : 0;
 }
 
 static int rna_Property_type_get(PointerRNA *ptr)
index aeb82e5640b2a726004fb2854ddd171ab27cf4a4..722b686218b0cb5c11e2bbae5c967d3c9755e523 100644 (file)
@@ -64,10 +64,12 @@ static void rna_userdef_lmb_select_set(PointerRNA *ptr,int value)
                userdef->flag &= ~USER_LMOUSESELECT;
 }
 
+#if 0
 static void rna_userdef_rmb_select_set(PointerRNA *ptr,int value)
 {
        rna_userdef_lmb_select_set(ptr, !value);
 }
+#endif
 
 static void rna_userdef_emulate_set(PointerRNA *ptr,int value)
 {