# HG changeset patch # User ladanyi # Date 1138895085 0 # Node ID 7349b09373a05c153a3202874117441494e103a0 # Parent 08834607d4db8eb2c85e97fdefd5cf8836ad427b Fix crash when an arrow is clicked with the delete tool. diff -r 08834607d4db -r 7349b09373a0 gui/graph_displayer_canvas-event.cc --- a/gui/graph_displayer_canvas-event.cc Thu Feb 02 13:43:01 2006 +0000 +++ b/gui/graph_displayer_canvas-event.cc Thu Feb 02 15:44:45 2006 +0000 @@ -554,6 +554,9 @@ } } + // return if the clicked object is neither an edge nor a node + if (active_edge == INVALID) return false; + //recolor activated item if(active_item) { @@ -596,7 +599,7 @@ deleteItem(active_node); } //a simple edge was chosen - else + else if (active_edge != INVALID) { deleteItem(active_edge); } @@ -608,7 +611,7 @@ { *active_item << Gnome::Canvas::Properties::fill_color("blue"); } - else + else if (active_edge != INVALID) { *active_item << Gnome::Canvas::Properties::fill_color("green"); }