From 81b50bcf5f466a61ae501df015cf925cd0981e26 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 10 Mar 2015 18:21:26 +1100 Subject: Fix crash enabling dyntopo in background mode --- source/blender/editors/sculpt_paint/sculpt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index c0925eeca39..ea046b7d4d5 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -56,6 +56,7 @@ #include "BKE_ccg.h" #include "BKE_context.h" #include "BKE_depsgraph.h" +#include "BKE_global.h" #include "BKE_image.h" #include "BKE_key.h" #include "BKE_library.h" @@ -4650,7 +4651,7 @@ static int sculpt_dynamic_topology_toggle_exec(bContext *C, wmOperator *UNUSED(o Object *ob = CTX_data_active_object(C); SculptSession *ss = ob->sculpt; - if (!GPU_vertex_buffer_support()) { + if (!G.background && !GPU_vertex_buffer_support()) { return OPERATOR_CANCELLED; } -- cgit v1.2.3