summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'devices/gdevbmp.c')
-rw-r--r--devices/gdevbmp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/devices/gdevbmp.c b/devices/gdevbmp.c
index 3c6630ee..f8ce596e 100644
--- a/devices/gdevbmp.c
+++ b/devices/gdevbmp.c
@@ -162,7 +162,9 @@ bmp_print_page(gx_device_printer * pdev, gp_file * file)
/* BMP files want the image in bottom-to-top order! */
for (y = pdev->height - 1; y >= 0; y--) {
- gdev_prn_copy_scan_lines(pdev, y, row, raster);
+ code = gdev_prn_copy_scan_lines(pdev, y, row, raster);
+ if (code < 0)
+ goto done;
gp_fwrite((const char *)row, bmp_raster, 1, file);
}