From 5652ed37093ad4bcf7d4b1b3e838f8a97c77e26d Mon Sep 17 00:00:00 2001 From: johanengelen Date: Tue, 27 Jan 2009 16:55:52 +0000 Subject: [PATCH] fix crash when drawing very quickly while still loading inkscape. --- src/pencil-context.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index a8c3112ac..a29e13e22 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -710,9 +710,8 @@ square(double const x) static void interpolate(SPPencilContext *pc) { - if ( pc->ps.size() <= 1 ) { - return; + return; } Inkscape::Preferences *prefs = Inkscape::Preferences::get(); @@ -775,7 +774,9 @@ interpolate(SPPencilContext *pc) static void sketch_interpolate(SPPencilContext *pc) { - g_assert( pc->ps.size() > 1 ); + if ( pc->ps.size() <= 1 ) { + return; + } Inkscape::Preferences *prefs = Inkscape::Preferences::get(); double const tol = prefs->getDoubleLimited("/tools/freehand/pencil/tolerance", 10.0, 1.0, 100.0) * 0.4; -- 2.30.2