diff options
| author | MenTaLguY <mental@rydia.net> | 2007-03-17 19:00:45 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2007-03-17 19:00:45 +0000 |
| commit | 70dcb712d89b98453c4ea6e4868c88af8d2887e4 (patch) | |
| tree | c19680dd8b7c41260a6224b54f3e1712a1da08da /src/gradient-chemistry.cpp | |
| parent | clean up rect mess a bit before start working on other stuff (diff) | |
| download | inkscape-70dcb712d89b98453c4ea6e4868c88af8d2887e4.tar.gz inkscape-70dcb712d89b98453c4ea6e4868c88af8d2887e4.zip | |
re-introduce isEmpty tests
(bzr r2679)
Diffstat (limited to 'src/gradient-chemistry.cpp')
| -rw-r--r-- | src/gradient-chemistry.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp index 5521f91cb..82a88faa3 100644 --- a/src/gradient-chemistry.cpp +++ b/src/gradient-chemistry.cpp @@ -260,7 +260,7 @@ sp_gradient_reset_to_userspace (SPGradient *gr, SPItem *item) sp_document_ensure_up_to_date(SP_OBJECT_DOCUMENT(item)); NR::Maybe<NR::Rect> bbox = item->getBounds(NR::identity()); // we need "true" bbox without item_i2d_affine - g_assert( bbox ); + g_assert( bbox && !bbox->isEmpty() ); NR::Coord const width = bbox->dimensions()[NR::X]; NR::Coord const height = bbox->dimensions()[NR::Y]; @@ -318,7 +318,7 @@ sp_gradient_convert_to_userspace(SPGradient *gr, SPItem *item, gchar const *prop sp_document_ensure_up_to_date(SP_OBJECT_DOCUMENT(item)); NR::Matrix bbox2user; NR::Maybe<NR::Rect> bbox = item->getBounds(NR::identity()); // we need "true" bbox without item_i2d_affine - if ( bbox ) { + if ( bbox && !bbox->isEmpty() ) { bbox2user = NR::Matrix(bbox->dimensions()[NR::X], 0, 0, bbox->dimensions()[NR::Y], bbox->min()[NR::X], bbox->min()[NR::Y]); |
