aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal.c
diff options
context:
space:
mode:
Diffstat (limited to 'ethereal.c')
-rw-r--r--ethereal.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ethereal.c b/ethereal.c
index 8348c72fdd..d8abb4b416 100644
--- a/ethereal.c
+++ b/ethereal.c
@@ -1,6 +1,6 @@
/* ethereal.c
*
- * $Id: ethereal.c,v 1.54 1999/07/13 03:08:04 gram Exp $
+ * $Id: ethereal.c,v 1.55 1999/07/13 04:38:14 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -542,7 +542,12 @@ filter_activate_cb(GtkWidget *w, gpointer data) {
/* Print a packet */
void
file_print_cmd_cb(GtkWidget *widget, gpointer data) {
- print_tree(cf.pd, fd, GTK_TREE(tree_view));
+ if (protocol_tree == NULL) {
+ simple_dialog(ESD_TYPE_WARN, NULL,
+ "No packet is selected, so there's no packet to print.");
+ return;
+ }
+ proto_tree_print((GNode*) protocol_tree, cf.pd, fd);
}
/* What to do when a list item is selected/unselected */