summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-10-20 06:59:40 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-10-20 06:59:40 +0000
commitb46e56139d6347043eea90aed1c4dd36cbaa3be2 (patch)
tree17c2012ebb7fcea89cd1522461fc3cf7c59edd97 /src
parentfill in set methods to enable x/y/w/h (diff)
downloadinkscape-b46e56139d6347043eea90aed1c4dd36cbaa3be2.tar.gz
inkscape-b46e56139d6347043eea90aed1c4dd36cbaa3be2.zip
handle the case of no filter primitives
(bzr r1813)
Diffstat (limited to 'src')
-rw-r--r--src/display/nr-filter.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/display/nr-filter.cpp b/src/display/nr-filter.cpp
index 328b5c12a..592623c49 100644
--- a/src/display/nr-filter.cpp
+++ b/src/display/nr-filter.cpp
@@ -85,6 +85,10 @@ Filter::~Filter()
int Filter::render(NRArenaItem const *item, NRPixBlock *pb)
{
+ if(!_primitive[0]) { // if there are no primitives, do nothing
+ return 0;
+ }
+
Matrix trans = *item->ctm;
FilterSlot slot(_slot_count, item);
NRPixBlock *in = new NRPixBlock;
@@ -134,10 +138,8 @@ int Filter::render(NRArenaItem const *item, NRPixBlock *pb)
slot.set(NR_FILTER_SOURCEGRAPHIC, in);
in = NULL; // in is now handled by FilterSlot, we should not touch it
- // TODO: loop through the primitives and render them one at a time
- if(_primitive[0])
- _primitive[0]->render(slot, trans);
-
+ // TODO: loop through ALL the primitives and render them one at a time
+ _primitive[0]->render(slot, trans);
NRPixBlock *out = slot.get(_output_slot);
// Clear the pixblock, where the output will be put