Fix 1780016. Right-clicking in the Children dialog no longer crashes studio.
[synfig.git] / synfig-studio / trunk / src / gtkmm / canvasview.cpp
index 7ce3871..477e17f 100644 (file)
@@ -790,7 +790,7 @@ CanvasView::CanvasView(etl::loose_handle<Instance> instance,etl::handle<synfigap
 
        // If the canvas is really big, zoom out so that we can fit it all in the window
        /*! \todo In other words, this is a zoom-to-fit, and should be
-       ** in it's own function.
+       ** in its own function.
        */
        int w=get_canvas()->rend_desc().get_w()+70;
        int h=get_canvas()->rend_desc().get_h()+70;
@@ -1310,11 +1310,9 @@ CanvasView::init_menus()
                action=Gtk::Action::create("seek-prev-second", Gtk::Stock::GO_BACK,_("Seek Backward"),_("Seek Backward"));
                action_group->add( action, sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time),Time(-1)));
 
-               // Broken...!?
-               /*
                action=Gtk::Action::create("seek-end", Gtk::Stock::GOTO_LAST,_("Seek to End"),_("Seek to End"));
                action_group->add(action,sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time),Time::end()));
-               */
+
                action=Gtk::Action::create("seek-begin", Gtk::Stock::GOTO_FIRST,_("Seek to Begin"),_("Seek to Begin"));
                action_group->add( action, sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time),Time::begin()));
 
@@ -2221,6 +2219,12 @@ CanvasView::on_children_user_click(int button, Gtk::TreeRow row, ChildrenTree::C
                        if(!(bool)row[children_tree_model.is_canvas])
                        {
                                synfigapp::ValueDesc value_desc=row[children_tree_model.value_desc];
+                               if (!value_desc)
+                               {
+                                       //! \todo fix properly -- what is the child dialog for?
+                                       synfig::info("preventing child dialog right-click crash");
+                                       return true;
+                               }
                                assert(value_desc);
                                popup_param_menu(value_desc);
                                return true;