From: dooglus Date: Sat, 24 Nov 2007 12:53:07 +0000 (+0000) Subject: Fix 1835429: crash closing preview window before using it. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=69d51ca9bea12b87bf5d8d81d0892ae824cb4147;p=synfig.git Fix 1835429: crash closing preview window before using it. git-svn-id: http://svn.voria.com/code@1164 1f10aa63-cdf2-0310-b900-c93c546f37ac --- 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()