fixes for warnings and crashes during doc generation
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user