git-svn-id: http://ltt.polymtl.ca/svn@472 04897980-b3bd-0310-b5e0-8ef037075253
authoryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 2 Feb 2004 18:32:29 +0000 (18:32 +0000)
committeryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 2 Feb 2004 18:32:29 +0000 (18:32 +0000)
ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c

index f7eaa26b6b7e10afb4825df6f9285f4dbdeb41b9..cc6ec38bf791c73086d2eec62e7a6fee1762a8fb 100644 (file)
@@ -498,19 +498,21 @@ void remove_trace(GtkWidget * widget, gpointer user_data)
       if(strcmp(remove_trace_name,name[i]) == 0){
        //unselect the trace from the current viewer
        w = gtk_multi_vpaned_get_widget(mw_data->current_tab->multi_vpaned);  
-       s = g_object_get_data(G_OBJECT(w), "Traceset_Selector");
-       t = lttv_traceset_selector_trace_get(s,i);
-       lttv_trace_selector_set_selected(t, FALSE);
-
-       //check if other viewers select the trace
-       w = gtk_multi_vpaned_get_first_widget(mw_data->current_tab->multi_vpaned);  
-       while(w){
+       if(w){
          s = g_object_get_data(G_OBJECT(w), "Traceset_Selector");
          t = lttv_traceset_selector_trace_get(s,i);
-         selected = lttv_trace_selector_get_selected(t);
-         if(selected)break;
-         w = gtk_multi_vpaned_get_next_widget(mw_data->current_tab->multi_vpaned);  
-       }
+         lttv_trace_selector_set_selected(t, FALSE);
+
+         //check if other viewers select the trace
+         w = gtk_multi_vpaned_get_first_widget(mw_data->current_tab->multi_vpaned);  
+         while(w){
+           s = g_object_get_data(G_OBJECT(w), "Traceset_Selector");
+           t = lttv_traceset_selector_trace_get(s,i);
+           selected = lttv_trace_selector_get_selected(t);
+           if(selected)break;
+           w = gtk_multi_vpaned_get_next_widget(mw_data->current_tab->multi_vpaned);  
+         }
+       }else selected = FALSE;
 
        //if no viewer selects the trace, remove it
        if(!selected){
This page took 0.028525 seconds and 4 git commands to generate.