diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-01-25 01:58:58 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-01-25 01:58:58 +0000 |
commit | 10552e31693981ab80ebe8ef9d0fa5c2bf55403f (patch) | |
tree | b25284901c599cebcf5a621b2d86b13272d26d26 /gtk/rtp_analysis.c | |
parent | a2c53bff757b49fe45863b3261a18033c7603890 (diff) | |
download | wireshark-10552e31693981ab80ebe8ef9d0fa5c2bf55403f.tar.gz wireshark-10552e31693981ab80ebe8ef9d0fa5c2bf55403f.tar.bz2 wireshark-10552e31693981ab80ebe8ef9d0fa5c2bf55403f.zip |
Check whether the "fopen()" that creates a CSV file fails and, if so,
report the error and don't dismiss the file selection dialog box.
svn path=/trunk/; revision=9831
Diffstat (limited to 'gtk/rtp_analysis.c')
-rw-r--r-- | gtk/rtp_analysis.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/rtp_analysis.c b/gtk/rtp_analysis.c index 1ace5039d0..9e0e0bdf92 100644 --- a/gtk/rtp_analysis.c +++ b/gtk/rtp_analysis.c @@ -1,7 +1,7 @@ /* rtp_analysis.c * RTP analysis addition for ethereal * - * $Id: rtp_analysis.c,v 1.24 2004/01/24 01:15:24 guy Exp $ + * $Id: rtp_analysis.c,v 1.25 2004/01/25 01:58:58 guy Exp $ * * Copyright 2003, Alcatel Business Systems * By Lars Ruoff <lars.ruoff@gmx.net> @@ -956,6 +956,11 @@ static void save_csv_as_ok_cb(GtkWidget *bt _U_, gpointer fs /*user_data_t *user if (GTK_TOGGLE_BUTTON(forw)->active || GTK_TOGGLE_BUTTON(both)->active) { fp = fopen(g_dest, "w"); + if (fp == NULL) { + simple_dialog(ESD_TYPE_CRIT, NULL, + file_open_error_message(errno, TRUE), g_dest); + return; + } if (GTK_TOGGLE_BUTTON(both)->active) { fprintf(fp, "Forward\n"); |