summaryrefslogtreecommitdiff
path: root/source/fitz/pixmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/pixmap.c')
-rw-r--r--source/fitz/pixmap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c
index 6ebc4770..c5a8a8cc 100644
--- a/source/fitz/pixmap.c
+++ b/source/fitz/pixmap.c
@@ -17,8 +17,7 @@ fz_drop_pixmap_imp(fz_context *ctx, fz_storable *pix_)
{
fz_pixmap *pix = (fz_pixmap *)pix_;
- if (pix->colorspace)
- fz_drop_colorspace(ctx, pix->colorspace);
+ fz_drop_colorspace(ctx, pix->colorspace);
if (pix->free_samples)
fz_free(ctx, pix->samples);
fz_free(ctx, pix);
@@ -77,8 +76,7 @@ fz_new_pixmap_with_data(fz_context *ctx, fz_colorspace *colorspace, int w, int h
}
fz_catch(ctx)
{
- if (colorspace)
- fz_drop_colorspace(ctx, colorspace);
+ fz_drop_colorspace(ctx, colorspace);
fz_free(ctx, pix);
fz_rethrow(ctx);
}