Skip to content

Commit 0e803fd

Browse files
author
Gustavo Pichorim Boiko
committed
Initialize the progressbar pointer (intpb) in the base integrator class.
This fixes a crash reported in this bug: http://www.yafaray.org/node/497
1 parent aa95a84 commit 0e803fd

File tree

5 files changed

+1
-4
lines changed

5 files changed

+1
-4
lines changed

include/core_api/integrator.h

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class renderArea_t;
4040
class YAFRAYCORE_EXPORT integrator_t
4141
{
4242
public:
43+
integrator_t() { scene = 0; intpb = 0; }
4344
//! this MUST be called before any other member function!
4445
void setScene(scene_t *s) { scene=s; }
4546
/*! do whatever is required to render the image, if suitable for integrating whole image */

src/integrators/bidirpath.cc

-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ biDirIntegrator_t::biDirIntegrator_t(bool transpShad, int shadowDepth): trShad(t
155155
lightPowerD(0), lightImage(0)
156156
{
157157
type = SURFACE;
158-
intpb = 0;
159158
integratorName = "BidirectionalPathTracer";
160159
integratorShortName = "BdPT";
161160
settings = "";

src/integrators/directlight.cc

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ directLighting_t::directLighting_t(bool transpShad, int shadowDepth, int rayDept
4949
usePhotonCaustics = false;
5050
sDepth = shadowDepth;
5151
rDepth = rayDepth;
52-
intpb = 0;
5352
integratorName = "DirectLight";
5453
integratorShortName = "DL";
5554
}

src/integrators/photonintegr.cc

-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ photonIntegrator_t::photonIntegrator_t(unsigned int dPhotons, unsigned int cPhot
114114
causRadius = cRad;
115115
rDepth = 6;
116116
maxBounces = 5;
117-
intpb = 0;
118117
integratorName = "PhotonMap";
119118
integratorShortName = "PM";
120119
}

src/integrators/sppm.cc

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const int nMaxGather = 1000; //used to gather all the photon in the radius. seem
1111
SPPM::SPPM(unsigned int dPhotons, int _passnum, bool transpShad, int shadowDepth)
1212
{
1313
type = SURFACE;
14-
intpb = 0;
1514
integratorName = "SPPM";
1615
integratorShortName = "SPPM";
1716
nPhotons = dPhotons;

0 commit comments

Comments
 (0)