From 3a4a3b3a94090023075c843dc46e86b1a1ea93bb Mon Sep 17 00:00:00 2001 From: johanengelen Date: Tue, 5 Aug 2008 18:16:06 +0000 Subject: [PATCH] replace unnecessary exception catching with a check beforehand. --- src/display/nr-filter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/display/nr-filter.cpp b/src/display/nr-filter.cpp index f7a04fd50..0e608e901 100644 --- a/src/display/nr-filter.cpp +++ b/src/display/nr-filter.cpp @@ -115,9 +115,9 @@ int Filter::render(NRArenaItem const *item, NRPixBlock *pb) FilterSlot slot(_slot_count, item); Rect item_bbox; - try { - item_bbox = *item->item_bbox; - } catch (NR::IsNothing) { + if (item->item_bbox) { + item_bbox = *(item->item_bbox); + } else { // Bounding box might not exist, so create a dummy one. Point zero(0, 0); item_bbox = Rect(zero, zero); -- 2.30.2