From: kiirala Date: Wed, 23 Jan 2008 11:54:28 +0000 (+0000) Subject: Fixed crash with lighting effects and missing source image X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ff01e5e776c82f67e351dd8db3fcf1c00e224bb2;p=inkscape.git Fixed crash with lighting effects and missing source image --- diff --git a/src/display/nr-filter-diffuselighting.cpp b/src/display/nr-filter-diffuselighting.cpp index 0fca45095..32896712c 100644 --- a/src/display/nr-filter-diffuselighting.cpp +++ b/src/display/nr-filter-diffuselighting.cpp @@ -51,7 +51,7 @@ 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; @@ -170,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; } diff --git a/src/display/nr-filter-specularlighting.cpp b/src/display/nr-filter-specularlighting.cpp index d579bf5f7..677f93dde 100644 --- a/src/display/nr-filter-specularlighting.cpp +++ b/src/display/nr-filter-specularlighting.cpp @@ -60,7 +60,7 @@ do {\ }while(0) int FilterSpecularLighting::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 feSpecularLighting (in=%d)", _input); return 1; @@ -180,8 +180,8 @@ int FilterSpecularLighting::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; }