From 69d51ca9bea12b87bf5d8d81d0892ae824cb4147 Mon Sep 17 00:00:00 2001 From: dooglus Date: Sat, 24 Nov 2007 12:53:07 +0000 Subject: [PATCH] Fix 1835429: crash closing preview window before using it. git-svn-id: http://svn.voria.com/code@1164 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/preview.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/preview.cpp b/synfig-studio/trunk/src/gtkmm/preview.cpp index 4f5bef1..3ab8dfa 100644 --- a/synfig-studio/trunk/src/gtkmm/preview.cpp +++ b/synfig-studio/trunk/src/gtkmm/preview.cpp @@ -861,15 +861,17 @@ void studio::Widget_Preview::repreview() void studio::Widget_Preview::stoprender() { - // don't crash if the render has already been stopped - if (!preview->renderer) - return; - if(preview) + { + // don't crash if the render has already been stopped + if (!preview->renderer) + return; + if (preview->renderer->updating) preview->renderer->stop(); else preview->renderer.detach(); + } } void studio::Widget_Preview::eraseall() -- 2.7.4