From 9501e52d54dcf5af9735470b64264203d3fa2c8c Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Thu, 11 Apr 2013 17:44:34 -0700 Subject: [PATCH] Timeline: Don't die if user selects nonsense item from Control Sequence Connect To menu. --- timeline/src/Control_Sequence.C | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/timeline/src/Control_Sequence.C b/timeline/src/Control_Sequence.C index 4f84a63..6575ede 100644 --- a/timeline/src/Control_Sequence.C +++ b/timeline/src/Control_Sequence.C @@ -511,14 +511,13 @@ Control_Sequence::menu_cb ( const Fl_Menu_ *m ) DMESSAGE( "Control_Sequence: menu_cb" ); - if ( ! m->mvalue() ) // || m->mvalue()->flags & FL_SUBMENU_POINTER || m->mvalue()->flags & FL_SUBMENU ) + if ( ! m->mvalue() || m->mvalue()->flags & ( FL_SUBMENU_POINTER | FL_SUBMENU )) return; m->item_pathname( picked, sizeof( picked ), m->mvalue() ); if ( ! strncmp( picked, "Connect To/", strlen( "Connect To/" ) ) ) { - char *peer_name = index( picked, '/' ) + 1; *index( peer_name, '/' ) = 0;