From bf5a354d55754606438002c1294f0177b24d907e Mon Sep 17 00:00:00 2001 From: buliabyak Date: Mon, 23 Apr 2007 20:40:50 +0000 Subject: [PATCH] fix 1705412: handle gracefully assigning gradients to no-bbox items --- src/gradient-chemistry.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp index 7ccc53486..fce26435c 100644 --- a/src/gradient-chemistry.cpp +++ b/src/gradient-chemistry.cpp @@ -276,7 +276,9 @@ sp_gradient_reset_to_userspace (SPGradient *gr, SPItem *item) sp_document_ensure_up_to_date(SP_OBJECT_DOCUMENT(item)); NR::Maybe bbox = item->getBounds(NR::identity()); // we need "true" bbox without item_i2d_affine - g_assert( bbox && !bbox->isEmpty() ); + if ( !bbox || bbox->isEmpty() ) + return gr; + NR::Coord const width = bbox->dimensions()[NR::X]; NR::Coord const height = bbox->dimensions()[NR::Y]; -- 2.30.2