diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-09-03 23:32:40 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-09-03 23:32:40 +0000 |
commit | d7c622e309d0b2a40c2df87c66765062631377ab (patch) | |
tree | ec76a902733fdaa078a61a7f3f94ff7848782635 /gtk/tcp_graph.c | |
parent | 4a4d2dcf7ea2c19d9bc66067414322f13b7741d4 (diff) |
Check for "wtap_seek_read()" failing.
svn path=/trunk/; revision=8364
Diffstat (limited to 'gtk/tcp_graph.c')
-rw-r--r-- | gtk/tcp_graph.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/tcp_graph.c b/gtk/tcp_graph.c index 7ad8bf668c..9d5539e55f 100644 --- a/gtk/tcp_graph.c +++ b/gtk/tcp_graph.c @@ -3,7 +3,7 @@ * By Pavel Mores <pvl@uh.cz> * Win32 port: rwh@unifiedtech.com * - * $Id: tcp_graph.c,v 1.33 2003/08/18 18:41:25 guy Exp $ + * $Id: tcp_graph.c,v 1.34 2003/09/03 23:32:40 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1791,8 +1791,13 @@ static void graph_segment_list_get (struct graph *g) for (ptr=cfile.plist; ptr; ptr=ptr->next) { /* XXX - do something with "err" */ - wtap_seek_read (cfile.wth, ptr->file_off, &pseudo_header, - pd, ptr->cap_len, &err); + if (!wtap_seek_read (cfile.wth, ptr->file_off, &pseudo_header, + pd, ptr->cap_len, &err)) { + simple_dialog(ESD_TYPE_CRIT, NULL, + file_read_error_message(err), + cfile.filename); + break; + } if (!segment) segment = (struct segment * )malloc (sizeof (struct segment)); if (!segment) |