From f5435d924ba172261070826ee67f38f112270679 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 27 May 2005 13:28:26 +0000 Subject: [PATCH] When backbuf doesn't exist, it crashed during render... Fixed! --- source/blender/render/intern/source/pixelshading.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c index 8a2992b7795..0071195abce 100644 --- a/source/blender/render/intern/source/pixelshading.c +++ b/source/blender/render/intern/source/pixelshading.c @@ -592,7 +592,7 @@ void shadeSkyPixel(RE_COLBUFTYPE *collector, float fx, float fy) /* 1. Do a backbuffer image: */ if(R.r.bufflag & 1) { - if(R.backbuf) fillBackgroundImage(collector, fx, fy); + fillBackgroundImage(collector, fx, fy); return; } else if((R.wrld.skytype & (WO_SKYBLEND+WO_SKYTEX))==0) { /* @@ -731,9 +731,9 @@ void fillBackgroundImageChar(char *col, float x, float y) int iy, ix; unsigned int* imBufPtr; - /* This double check is bad... */ - if (!(R.backbuf->ok)) { - /* Something went sour here... bail... */ + /* check to be sure... */ + if (R.backbuf==NULL || R.backbuf->ok==0) { + /* bail out */ col[0] = 0; col[1] = 0; col[2] = 0;