summaryrefslogtreecommitdiff
path: root/ext/gd/libgd/gd_interpolation.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gd/libgd/gd_interpolation.c')
-rw-r--r--ext/gd/libgd/gd_interpolation.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index 0961c08048..4fa23f0a14 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -1049,6 +1049,9 @@ static inline void _gdScaleVert (const gdImagePtr pSrc, const unsigned int src_w
}
contrib = _gdContributionsCalc(dst_height, src_height, (double)(dst_height) / (double)(src_height), pSrc->interpolation);
+ if (contrib == NULL) {
+ return;
+ }
/* scale each column */
for (u = 0; u < dst_width - 1; u++) {
_gdScaleCol(pSrc, src_width, pDst, dst_width, dst_height, u, contrib);