diff options
Diffstat (limited to 'source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp')
-rw-r--r-- | source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp index dc88f69c95b..4d8c6a66d42 100644 --- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp +++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp @@ -628,15 +628,19 @@ Render *FRS_do_stroke_rendering(Render *re, SceneRenderLayer *srl, int render) re->stats_draw(re->sdh, &re->i); re->i.infostr = NULL; g_freestyle.scene = re->scene; - controller->DrawStrokes(); - freestyle_render = controller->RenderStrokes(re, true); + int strokeCount = controller->DrawStrokes(); + if (strokeCount > 0) { + freestyle_render = controller->RenderStrokes(re, true); + } controller->CloseFile(); g_freestyle.scene = NULL; // composite result - FRS_composite_result(re, srl, freestyle_render); - RE_FreeRenderResult(freestyle_render->result); - freestyle_render->result = NULL; + if (freestyle_render) { + FRS_composite_result(re, srl, freestyle_render); + RE_FreeRenderResult(freestyle_render->result); + freestyle_render->result = NULL; + } } } |