From: jucablues Date: Thu, 16 Aug 2007 16:50:59 +0000 (+0000) Subject: avoid crash described in bug report [ 1762588 ] crash: feOffset with X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f475f45d136f95c043e3c1b9c2f9ccad842f9a06;p=inkscape.git avoid crash described in bug report [ 1762588 ] crash: feOffset with input StrokePaint or FillPaint --- diff --git a/src/display/nr-filter-offset.cpp b/src/display/nr-filter-offset.cpp index 3b9c051e2..4facd9436 100644 --- a/src/display/nr-filter-offset.cpp +++ b/src/display/nr-filter-offset.cpp @@ -35,6 +35,12 @@ int FilterOffset::render(FilterSlot &slot, Matrix const &trans) { NRPixBlock *in = slot.get(_input); NRPixBlock *out = new NRPixBlock; + // Bail out if source image is missing + if (!in) { + g_warning("Missing source image for feOffset (in=%d)", _input); + return 1; + } + Point offset(dx, dy); offset *= trans; offset[X] -= trans[4];