Index: trunk/psphot/src/psphotMosaicSubimage.c
===================================================================
--- trunk/psphot/src/psphotMosaicSubimage.c	(revision 19881)
+++ trunk/psphot/src/psphotMosaicSubimage.c	(revision 21253)
@@ -32,4 +32,9 @@
 
     psImage *subImage = psImageSubset (inImage, inRegion);
+    if (!subImage) {
+	psErrorClear(); // XXX I think there is an error in psphotVisual that is supplying bad images
+	return false;
+    }
+
     psImage *newImage = psImageAlloc (subImage->numCols, subImage->numRows, PS_TYPE_F32);
     for (int iy = 0; iy < newImage->numRows; iy++) {
