From 4dc583f5b28383a38d6140dfa475e8d2cf8ff49e Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 15 Aug 2016 22:25:15 +0200 Subject: Fix bug reported in http://www.viva64.com/en/b/0419/ (bzr r15058) --- src/sp-mesh-array.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/sp-mesh-array.cpp') diff --git a/src/sp-mesh-array.cpp b/src/sp-mesh-array.cpp index 6bd5c85d7..0dd89ac96 100644 --- a/src/sp-mesh-array.cpp +++ b/src/sp-mesh-array.cpp @@ -1046,11 +1046,12 @@ void SPMeshNodeArray::create( SPMesh *mg, SPItem *item, Geom::OptRect bbox ) { if( !bbox ) { // Set default size to bounding box if size not given. std::cout << "SPMeshNodeArray::create(): bbox empty" << std::endl; - Geom::OptRect bbox = item->geometricBounds(); - } - if( !bbox ) { - std::cout << "SPMeshNodeArray::create: ERROR: No bounding box!" << std::endl; - return; + bbox = item->geometricBounds(); + + if( !bbox ) { + std::cout << "SPMeshNodeArray::create: ERROR: No bounding box!" << std::endl; + return; + } } Geom::Coord const width = bbox->dimensions()[Geom::X]; -- cgit v1.2.3