Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2015-05-09 07:04:29 +0300
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2015-05-09 07:20:40 +0300
commit8c1b805f87209ae6282d77b213ed2527f2d7c207 (patch)
tree7e9451a76c622219dbcc676d761603b89393f319 /source/blender/freestyle
parenteb811538960147e68fd6c2c530ed3ca67fa875e6 (diff)
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.
Diffstat (limited to 'source/blender/freestyle')
-rw-r--r--source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index 291ed98f905..64c6bd33924 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -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;