fix for NULL missing pointer check, reported on IRC by admix.

also rename BVH class for consistency.
This commit is contained in:
Campbell Barton
2011-01-13 05:05:10 +00:00
parent 8227b3d463
commit 6a9d93a339
3 changed files with 7 additions and 7 deletions

View File

@@ -30,7 +30,7 @@ from bpy.props import *
from io_utils import ImportHelper, ExportHelper
class BvhImporter(bpy.types.Operator, ImportHelper):
class ImportBVH(bpy.types.Operator, ImportHelper):
'''Load a BVH motion capture file'''
bl_idname = "import_anim.bvh"
bl_label = "Import BVH"
@@ -68,7 +68,7 @@ class BvhImporter(bpy.types.Operator, ImportHelper):
return import_bvh.load(self, context, **self.as_keywords(ignore=("filter_glob",)))
class BvhExporter(bpy.types.Operator, ExportHelper):
class ExportBVH(bpy.types.Operator, ExportHelper):
'''Save a BVH motion capture file from an armature'''
bl_idname = "export_anim.bvh"
bl_label = "Export BVH"
@@ -101,11 +101,11 @@ class BvhExporter(bpy.types.Operator, ExportHelper):
def menu_func_import(self, context):
self.layout.operator(BvhImporter.bl_idname, text="Motion Capture (.bvh)")
self.layout.operator(ImportBVH.bl_idname, text="Motion Capture (.bvh)")
def menu_func_export(self, context):
self.layout.operator(BvhExporter.bl_idname, text="Motion Capture (.bvh)")
self.layout.operator(ExportBVH.bl_idname, text="Motion Capture (.bvh)")
def register():

View File

@@ -543,9 +543,9 @@ static int gp_convert_poll (bContext *C)
{
bGPdata *gpd= gpencil_data_get_active(C);
ScrArea *sa= CTX_wm_area(C);
/* only if there's valid data, and the current view is 3D View */
return ((sa->spacetype == SPACE_VIEW3D) && gpencil_layer_getactive(gpd));
return ((sa && sa->spacetype == SPACE_VIEW3D) && gpencil_layer_getactive(gpd));
}
static int gp_convert_layer_exec (bContext *C, wmOperator *op)

View File

@@ -1135,7 +1135,7 @@ static void rna_def_curve_spline_bezpoints(BlenderRNA *brna, PropertyRNA *cprop)
//PropertyRNA *prop;
FunctionRNA *func;
PropertyRNA *parm;
//PropertyRNA *parm;
RNA_def_property_srna(cprop, "SplineBezierPoints");
srna= RNA_def_struct(brna, "SplineBezierPoints", NULL);