diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libpm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libpm.c b/lib/libpm.c index 62ba0180..69085099 100644 --- a/lib/libpm.c +++ b/lib/libpm.c @@ -328,6 +328,10 @@ pm_allocarray(int const cols, pm_mallocarray2(&result, rows, cols, elementSize); + if (result == NULL) + pm_error("Failed to allocate a raster array of %u columns x %u rows", + cols, rows); + retval = result; return retval; |