-Warn if first raster is NULL in RASTER_copyband and return NULL
git-svn-id: http://svn.osgeo.org/postgis/trunk@6964
b70326c6-7e19-0410-871a-
916f4a2858ee
}
/* Deserialize raster */
+ if (PG_ARGISNULL(0)) {
+ /* Simply return NULL */
+ elog(NOTICE, "Raster can not be NULL. Returning NULL");
+ PG_RETURN_NULL();
+ }
pgraster = (rt_pgraster *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0));
ctx = get_rt_context(fcinfo);
rt_context ctx = NULL;
/* Deserialize torast */
- if (PG_ARGISNULL(0))
+ if (PG_ARGISNULL(0)) {
+ /* Simply return NULL */
+ elog(NOTICE, "First raster can not be NULL. Returning NULL");
PG_RETURN_NULL();
+ }
pgraster = (rt_pgraster *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0));
ctx = get_rt_context(fcinfo);