Freestyle: Partial fix for a crash with Save Buffers option enabled.

Prevents null pointer references in the case of the Save Buffers option
enabled.  This is a regression likely due to rBd5f1b9c22233.
This commit is contained in:
Tamito Kajiyama 2015-05-09 13:04:29 +09:00
parent eb81153896
commit 8c1b805f87
Notes: blender-bot 2023-02-14 09:08:34 +01:00
Referenced by issue #44662, Freestyle gives no visual output when the Save Buffers option is enabled
1 changed files with 16 additions and 4 deletions

View File

@ -493,12 +493,18 @@ void FRS_composite_result(Render *re, SceneRenderLayer *srl, Render *freestyle_r
rl = render_get_active_layer( freestyle_render, freestyle_render->result );
if (!rl) {
if (G.debug & G_DEBUG_FREESTYLE) {
cout << "No Freestyle result image to composite" << endl;
cout << "No source render layer to composite" << endl;
}
return;
}
src = RE_RenderLayerGetPass(rl, SCE_PASS_COMBINED, re->viewname);
src = RE_RenderLayerGetPass(rl, SCE_PASS_COMBINED, freestyle_render->viewname);
if (!src) {
if (G.debug & G_DEBUG_FREESTYLE) {
cout << "No source result image to composite" << endl;
}
return;
}
#if 0
if (G.debug & G_DEBUG_FREESTYLE) {
cout << "src: " << rl->rectx << " x " << rl->recty << endl;
@ -506,13 +512,19 @@ void FRS_composite_result(Render *re, SceneRenderLayer *srl, Render *freestyle_r
#endif
rl = RE_GetRenderLayer(re->result, srl->name);
if (!rl || src == NULL) {
if (!rl) {
if (G.debug & G_DEBUG_FREESTYLE) {
cout << "No layer to composite to" << endl;
cout << "No destination render layer to composite to" << endl;
}
return;
}
dest = RE_RenderLayerGetPass(rl, SCE_PASS_COMBINED, re->viewname);
if (!dest) {
if (G.debug & G_DEBUG_FREESTYLE) {
cout << "No destination result image to composite to" << endl;
}
return;
}
#if 0
if (G.debug & G_DEBUG_FREESTYLE) {
cout << "dest: " << rl->rectx << " x " << rl->recty << endl;