forked from osmocom/wireshark
Check if a packet is selected before trying to build a display filter based
on the "selected" packet. Fixes bug 2020. svn path=/trunk/; revision=23596
This commit is contained in:
parent
b19c9f164e
commit
24c8b3a4b7
20
gtk/menu.c
20
gtk/menu.c
|
@ -368,16 +368,18 @@ conversation_cb(GtkWidget * w, gpointer data _U_, int action)
|
||||||
gchar *filter;
|
gchar *filter;
|
||||||
GtkWidget *filter_te;
|
GtkWidget *filter_te;
|
||||||
|
|
||||||
/* create a filter-string based on the selected packet and action */
|
if (cfile.finfo_selected) {
|
||||||
filter = build_conversation_filter(action, TRUE);
|
/* create a filter-string based on the selected packet and action */
|
||||||
|
filter = build_conversation_filter(action, TRUE);
|
||||||
|
|
||||||
/* Run the display filter so it goes in effect - even if it's the
|
/* Run the display filter so it goes in effect - even if it's the
|
||||||
same as the previous display filter. */
|
same as the previous display filter. */
|
||||||
filter_te = OBJECT_GET_DATA(w, E_DFILTER_TE_KEY);
|
filter_te = OBJECT_GET_DATA(w, E_DFILTER_TE_KEY);
|
||||||
gtk_entry_set_text(GTK_ENTRY(filter_te), filter);
|
gtk_entry_set_text(GTK_ENTRY(filter_te), filter);
|
||||||
main_filter_packets(&cfile, filter, TRUE);
|
main_filter_packets(&cfile, filter, TRUE);
|
||||||
|
|
||||||
g_free(filter);
|
g_free(filter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -388,7 +390,7 @@ colorize_conversation_cb(GtkWidget * w _U_, gpointer data _U_, int action)
|
||||||
if( (action>>8) == 255 ) {
|
if( (action>>8) == 255 ) {
|
||||||
color_filters_reset_tmp();
|
color_filters_reset_tmp();
|
||||||
cf_colorize_packets(&cfile);
|
cf_colorize_packets(&cfile);
|
||||||
} else {
|
} else if (cfile.finfo_selected) {
|
||||||
if( (action&0xff) == 0 ) {
|
if( (action&0xff) == 0 ) {
|
||||||
/* colorize_conversation_cb was called from the window-menu
|
/* colorize_conversation_cb was called from the window-menu
|
||||||
* or through an accelerator key. Try to build a conversation
|
* or through an accelerator key. Try to build a conversation
|
||||||
|
|
Loading…
Reference in New Issue