Merged revision(s) 58682-58770 from trunk/blender into soc-2013-dingto.
[blender.git] / intern / cycles / blender / blender_session.cpp
index 6e535e82886be7a9bed9e749731c157c926da779..fb743acf29af3c34643b532418a5c65dfdf9af2e 100644 (file)
@@ -285,6 +285,11 @@ void BlenderSession::do_write_update_render_tile(RenderTile& rtile, bool do_upda
 
        BL::RenderResult::layers_iterator b_single_rlay;
        b_rr.layers.begin(b_single_rlay);
+
+       /* layer will be missing if it was disabled in the UI */
+       if(b_single_rlay == b_rr.layers.end())
+               return;
+
        BL::RenderLayer b_rlay = *b_single_rlay;
 
        if (do_update_only) {