summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qgrayraster.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qgrayraster.c')
-rw-r--r--src/gui/painting/qgrayraster.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c
index d0e25a9..ec9ebeb 100644
--- a/src/gui/painting/qgrayraster.c
+++ b/src/gui/painting/qgrayraster.c
@@ -325,6 +325,7 @@
{
void* buffer;
long buffer_size;
+ long buffer_allocated_size;
int band_size;
void* memory;
PWorker worker;
@@ -1791,7 +1792,7 @@
// If raster object and raster buffer are allocated, but
// raster size isn't of the minimum size, indicate out of
// memory.
- if (raster && raster->buffer && raster->buffer_size < MINIMUM_POOL_SIZE )
+ if (raster->buffer_allocated_size < MINIMUM_POOL_SIZE )
return ErrRaster_OutOfMemory;
/* return immediately if the outline is empty */
@@ -1930,6 +1931,7 @@
rast->buffer_size = 0;
rast->worker = NULL;
}
+ rast->buffer_allocated_size = pool_size;
}
}