Fix 1780016. Right-clicking in the Children dialog no longer crashes studio.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 31 Aug 2007 13:12:31 +0000 (13:12 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 31 Aug 2007 13:12:31 +0000 (13:12 +0000)
git-svn-id: http://svn.voria.com/code@568 1f10aa63-cdf2-0310-b900-c93c546f37ac

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

index 4b1d351..477e17f 100644 (file)
@@ -2219,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;