Fix a variable-read-before-set error.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 26 Sep 2007 09:12:22 +0000 (09:12 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 26 Sep 2007 09:12:22 +0000 (09:12 +0000)
git-svn-id: http://svn.voria.com/code@761 1f10aa63-cdf2-0310-b900-c93c546f37ac

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

index 93381d4..b8f60c3 100644 (file)
@@ -796,6 +796,13 @@ CanvasView::CanvasView(etl::loose_handle<Instance> instance,etl::handle<synfigap
        int h=get_canvas()->rend_desc().get_h()+70;
        while(w>700 || h>600)
        {
+               // Minor hack:
+               //   zoom_out() =>
+               //         WorkArea::async_update_preview() =>
+               //           WorkArea::set_zoom(float) =>
+               //                 WorkArea::async_update_preview() =>
+               //                       desc.set_time(cur_time), where cur_time isn't initialised
+               work_area->set_time(0);
                work_area->zoom_out();
                w=round_to_int(get_canvas()->rend_desc().get_w()*work_area->get_zoom()+70);
                h=round_to_int(get_canvas()->rend_desc().get_h()*work_area->get_zoom()+70);