summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sp-mesh-array.cpp11
1 files changed, 6 insertions, 5 deletions
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];