From a1554bad2efd40c185096ce81c4ad786d43a1e16 Mon Sep 17 00:00:00 2001 From: Felipe Corr??a da Silva Sanches Date: Thu, 16 Aug 2007 16:50:59 +0000 Subject: avoid crash described in bug report [ 1762588 ] crash: feOffset with input StrokePaint or FillPaint (bzr r3482) --- src/display/nr-filter-offset.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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]; -- cgit v1.2.3