fix [#25691] Lasso select on 3D Text editing segfaults
[blender-staging.git] / source / blender / editors / space_view3d / view3d_select.c
index 4bb263d3ed9e89edb1d04fdfaa9f765afe701197..c55a1bf1489e11c2c10f82741e08f1522487e8cd 100644 (file)
@@ -218,16 +218,24 @@ void arrows_move_cursor(unsigned short event)
 static int view3d_selectable_data(bContext *C)
 {
        Object *ob = CTX_data_active_object(C);
-       
+
        if (!ED_operator_region_view3d_active(C))
                return 0;
-       
-       if (!CTX_data_edit_object(C))
-               if (ob && ob->mode & OB_MODE_SCULPT)
+
+       if (ob->mode & OB_MODE_EDIT) {
+               if(ob->type == OB_FONT) {
                        return 0;
-               if (ob && ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT) && !paint_facesel_test(ob))
+               }
+       }
+       else {
+               if (ob && ob->mode & OB_MODE_SCULPT) {
                        return 0;
-       
+               }
+               if (ob && ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT) && !paint_facesel_test(ob)) {
+                       return 0;
+               }
+       }
+
        return 1;
 }