X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fpreview.cpp;h=ee6ecf88ba0d145381d1c2ba2d7429a4920284b5;hb=e1907fab9d7cf65d9fc84be9617959e59fc6e20c;hp=ce8424f7421a1c3eb24bc09af1501a04a7baa178;hpb=c3ad95144d148602f672e95ddda1f18fc35502f8;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/preview.cpp b/synfig-studio/trunk/src/gtkmm/preview.cpp index ce8424f..ee6ecf8 100644 --- a/synfig-studio/trunk/src/gtkmm/preview.cpp +++ b/synfig-studio/trunk/src/gtkmm/preview.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -40,6 +41,9 @@ #include #include "asyncrenderer.h" + +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -255,7 +259,7 @@ void studio::Preview::frame_finish(const Preview_Target *targ) if(!buffer) return; - //convert all the pixles to the pixbuf... buffer... thing... + //convert all the pixels to the pixbuf... buffer... thing... //synfig::warning("Converting..."); convert_color_format(buffer, surf[0], surf.get_w()*surf.get_h(), pf, App::gamma); @@ -857,10 +861,15 @@ 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) - { - preview->renderer.detach(); - } + if (preview->renderer->updating) + preview->renderer->stop(); + else + preview->renderer.detach(); } void studio::Widget_Preview::eraseall()