Code

add simplified feed_path_to_cairo functions
[inkscape.git] / src / display / nr-filter-diffuselighting.cpp
index 9ff3922e8d1c2b049b8d10ab7da40e0c18e76872..32896712cb64c206acf5368cbd800957b67d90b8 100644 (file)
@@ -51,7 +51,12 @@ do {\
 
 
 int FilterDiffuseLighting::render(FilterSlot &slot, FilterUnits const &units) {
-    NRPixBlock *in = filter_get_alpha(slot.get(_input));
+    NRPixBlock *in = slot.get(_input);
+    if (!in) {
+        g_warning("Missing source image for feDiffuseLighting (in=%d)", _input);
+        return 1;
+    }
+
     NRPixBlock *out = new NRPixBlock;
 
     int w = in->area.x1 - in->area.x0;
@@ -165,8 +170,8 @@ int FilterDiffuseLighting::render(FilterSlot &slot, FilterUnits const &units) {
         
     //finishing
     slot.set(_output, out);
-    nr_pixblock_release(in);
-    delete in;
+    //nr_pixblock_release(in);
+    //delete in;
     return 0;
 }