diff options
Diffstat (limited to 'src/gui/painting/qgrayraster.c')
-rw-r--r-- | src/gui/painting/qgrayraster.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c index 1ba9805..d3fa3a2 100644 --- a/src/gui/painting/qgrayraster.c +++ b/src/gui/painting/qgrayraster.c @@ -137,7 +137,9 @@ #define ErrRaster_MemoryOverflow -4 - +#if defined(VXWORKS) +# include <vxWorksCommon.h> /* needed for setjmp.h */ +#endif #include <string.h> /* for qt_ft_memcpy() */ #include <setjmp.h> #include <limits.h> @@ -1878,6 +1880,10 @@ if (memory) fprintf(stderr, "gray_raster_new(), memory ignored"); memory = malloc(sizeof(TRaster)); + if (!memory) { + *araster = 0; + return ErrRaster_Memory_Overflow; + } QT_FT_MEM_ZERO(memory, sizeof(TRaster)); *araster = (QT_FT_Raster) memory; |