From de2717c1a5fde3c9a8c5628536df6271be3f234c Mon Sep 17 00:00:00 2001 From: theadib Date: Sun, 1 Feb 2009 23:48:26 +0000 Subject: [PATCH] FIX for bug 317964; SVG crashes on empthy flow-text element --- src/libnrtype/Layout-TNG-Compute.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/libnrtype/Layout-TNG-Compute.cpp b/src/libnrtype/Layout-TNG-Compute.cpp index 2e65c2b24..7a2924d98 100644 --- a/src/libnrtype/Layout-TNG-Compute.cpp +++ b/src/libnrtype/Layout-TNG-Compute.cpp @@ -1345,10 +1345,16 @@ bool Layout::Calculator::calculate() { if (_flow._input_stream.empty()) return false; - g_assert(_flow._input_stream.front()->Type() == TEXT_SOURCE); + /** + * hm, why do we want assert (crash) the application, now do simply return false + * \todo check if this is the correct behaviour + * g_assert(_flow._input_stream.front()->Type() == TEXT_SOURCE); + */ if (_flow._input_stream.front()->Type() != TEXT_SOURCE) + { + g_warning("flow text is not of type TEXT_SOURCE. Abort."); return false; - + } TRACE(("begin calculateFlow()\n")); _flow._clearOutputObjects(); -- 2.30.2