Code

avoid crash described in bug report [ 1762588 ] crash: feOffset with
authorjucablues <jucablues@users.sourceforge.net>
Thu, 16 Aug 2007 16:50:59 +0000 (16:50 +0000)
committerjucablues <jucablues@users.sourceforge.net>
Thu, 16 Aug 2007 16:50:59 +0000 (16:50 +0000)
input StrokePaint or FillPaint

src/display/nr-filter-offset.cpp

index 3b9c051e20ca9dca95c126f90dacec89bc7a4de3..4facd94364a8e3867375e8b70e5ace5bdc504efd 100644 (file)
@@ -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];