From: buliabyak Date: Fri, 20 Oct 2006 06:59:40 +0000 (+0000) Subject: handle the case of no filter primitives X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=62d31275d48feeac9615611451ff4c9b724465e0;p=inkscape.git handle the case of no filter primitives --- 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