search for: sraster

Displaying 1 result from an estimated 1 matches for "sraster".

Did you mean: raster
2013 Sep 16
1
Patch: fix segfault from empty raster
...In L_raster() (grid.c), this raster is not a "nativeRaster", so we do image = (unsigned int*) R_alloc(n, sizeof(unsigned int)); with n = 0, and R_alloc() gives us a NULL pointer. The display of this raster requests interpolation, so we end up in R_GE_rasterInterpolate(), where 'sraster' is NULL, and chaos ensues as it tries to read source pixels. It seems to me that it doesn't make sense to display an empty raster, so I inserted a check in L_raster(). A proof-of-concept patch is attached. With this patch, R gives an error message instead of a segfault. Does this seem a...