diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-06-19 13:20:55 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-06-19 13:20:55 +0300 |
commit | 4dc71367c7001a6d5395780e5493076d5d700300 (patch) | |
tree | 2dfc6078acdd4269197d6b58a26a952fb5386af4 /source/blender/draw/modes/object_mode.c | |
parent | c2ad29397c69f05108ba1d5311596578dcf3fe91 (diff) |
Fix T65918 DRW: Crash when add a any modifier to a curve
Diffstat (limited to 'source/blender/draw/modes/object_mode.c')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index bbf364960c9..e8c600ee545 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -3221,10 +3221,12 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) break; } geom = DRW_cache_lattice_wire_get(ob, false); + if (geom == NULL) { + break; + } if (theme_id == TH_UNDEFINED) { theme_id = DRW_object_wire_theme_get(ob, view_layer, NULL); } - shgroup = shgroup_theme_id_to_wire(sgl, theme_id, ob->base_flag); DRW_shgroup_call(shgroup, geom, ob); } @@ -3236,6 +3238,9 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) break; } geom = DRW_cache_curve_edge_wire_get(ob); + if (geom == NULL) { + break; + } if (theme_id == TH_UNDEFINED) { theme_id = DRW_object_wire_theme_get(ob, view_layer, NULL); } |