Fix the crash that the previous commit half-fixed.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 26 Sep 2007 19:10:53 +0000 (19:10 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 26 Sep 2007 19:10:53 +0000 (19:10 +0000)
studio::App::quit()                                                     at app.cpp:1575
  studio::Instance::safe_close ()                                       at instance.cpp:687
    [ handle magic ]
      ~CanvasView (this=0xa432378)                                      at canvasview.cpp:918
        ~WorkArea (this=0x8ed2a10)                                      at workarea.cpp:815
          [ handle magic ]
        ^   ~Canvas (this=0x8e8a2b8)                                    at canvas.cpp:94
        |     synfig::Canvas::clear ()                                  at canvas.cpp:136
        |       synfig::Canvas::erase (iter)                            at canvas.cpp:758
        |         synfig::Node::changed ()                              at node.cpp:194
        |           synfig::Canvas::on_changed ()                       at canvas.cpp:86
        |             synfig::Node::on_changed ()                       at node.cpp:290
        |               [ sigc magic ]
        |                 studio::CanvasView::on_dirty_preview ()       at canvasview.cpp:2774
        `- illegal -------  work_area->queue_render_preview();

git-svn-id: http://svn.voria.com/code@767 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/canvasview.cpp

index b8f60c3..718a90b 100644 (file)
@@ -912,6 +912,10 @@ CanvasView::~CanvasView()
 
        hide();
 
+       // don't be calling on_dirty_preview once this object has been deleted;
+       // this was causing a crash before
+       canvas_interface()->signal_dirty_preview().clear();
+
        synfig::info("CanvasView:~CanvasView(): Destructor Finished");
 }