fix crash caused by stroke selection
authorMartin Poirier <theeth@yahoo.com>
Sun, 9 Aug 2009 22:22:40 +0000 (22:22 +0000)
committerMartin Poirier <theeth@yahoo.com>
Sun, 9 Aug 2009 22:22:40 +0000 (22:22 +0000)
source/blender/editors/armature/editarmature_sketch.c

index f3f7bccde043062a9401f1f15bb738fe057b8416..ce3bcc8aed5aca819cb71617ba276602cddaad7b 100644 (file)
@@ -2466,8 +2466,10 @@ static int sketch_delete(bContext *C, wmOperator *op, wmEvent *event)
 
 void BIF_sk_selectStroke(bContext *C, short mval[2], short extend)
 {
+       ToolSettings *ts = CTX_data_tool_settings(C);
        SK_Sketch *sketch = contextSketch(C, 0);
-       if (sketch)
+
+       if (sketch != NULL && ts->bone_sketching & BONE_SKETCHING)
        {
                sk_selectStroke(C, sketch, mval, extend);
        }