aboutsummaryrefslogtreecommitdiffstats
path: root/summary.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-02-29 16:51:32 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-02-29 16:51:32 +0000
commitd24fad6371fb15e9b02f9a0bb27251e4102a8956 (patch)
tree05d6336b30c63b0f1c00751ffb06968bea8e16b5 /summary.c
parent094e8f8947730632710030b5bde07d1a10801e7c (diff)
- Add a LED in the statusbar to indicate that capture comments exists,
clickable to open an edit window. - Add checks for NULL pointers. Help with a different color LED possibly with Jeff's (c) in it apreceated. Should the LED be placed elsewhere or the whole thing done differently? svn path=/trunk/; revision=41242
Diffstat (limited to 'summary.c')
-rw-r--r--summary.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/summary.c b/summary.c
index bc4df8a2fc..f266044aba 100644
--- a/summary.c
+++ b/summary.c
@@ -159,11 +159,18 @@ summary_fill_in(capture_file *cf, summary_tally *st)
shb_inf = wtap_file_get_shb_info(cf->wth);
shb_inf = wtap_file_get_shb_info(cf->wth);
- st->opt_comment = shb_inf->opt_comment;
- st->shb_hardware = shb_inf->shb_hardware;
- st->shb_os = shb_inf->shb_os;
- st->shb_user_appl = shb_inf->shb_user_appl;
- g_free(shb_inf);
+ if(shb_inf == NULL){
+ st->opt_comment = NULL;
+ st->shb_hardware = NULL;
+ st->shb_os = NULL;
+ st->shb_user_appl = NULL;
+ }else{
+ st->opt_comment = shb_inf->opt_comment;
+ st->shb_hardware = shb_inf->shb_hardware;
+ st->shb_os = shb_inf->shb_os;
+ st->shb_user_appl = shb_inf->shb_user_appl;
+ g_free(shb_inf);
+ }
st->ifaces = g_array_new(FALSE, FALSE, sizeof(iface_options));
}
@@ -228,4 +235,4 @@ summary_update_comment(capture_file *cf, gchar *comment)
/* Get info from SHB */
wtap_write_shb_comment(cf->wth, comment);
-} \ No newline at end of file
+}