Blob Blame History Raw
diff --git a/ui/gtk/capture_dlg.c b/ui/gtk/capture_dlg.c
index f0d1115..db165f1 100644
--- a/ui/gtk/capture_dlg.c
+++ b/ui/gtk/capture_dlg.c
@@ -4206,6 +4206,10 @@ capture_start_cb(GtkWidget *w _U_, gpointer d _U_)
     airpcap_set_toolbar_start_capture(airpcap_if_active);
 #endif
 
+  /* XXX - will closing this remove a temporary file? */
+  if (!do_file_close(&cfile, FALSE, " before starting a new capture"))
+    return;
+
   if (cap_open_w) {
     /*
      * There's an options dialog; get the values from it and close it.
@@ -4230,9 +4234,7 @@ capture_start_cb(GtkWidget *w _U_, gpointer d _U_)
     return;
   }
 
-  /* XXX - will closing this remove a temporary file? */
-  if (do_file_close(&cfile, FALSE, " before starting a new capture"))
-    capture_start_confirmed();
+  capture_start_confirmed();
 }