From 8c8579d911c7bb9ceaf1e28a26950e6db882a79d Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Wed, 8 Apr 2009 20:19:20 +0000 Subject: Made the calculation of the number of available style modules more robust --- source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/freestyle/intern') diff --git a/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp b/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp index 95d0a5f7fa1..d780191ce94 100644 --- a/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp +++ b/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp @@ -227,6 +227,9 @@ extern "C" { int displayed_layer_count( SceneRenderLayer* srl ) { int count = 0; + + if( panelConfig->layers.find(srl) == panelConfig->layers.end() ) + return 0; for( StyleModuleConf* module_conf = (StyleModuleConf *)panelConfig->modules[srl]->first; module_conf; module_conf = module_conf->next ) { if( module_conf->is_displayed ) -- cgit v1.2.3