From Gregor Beck:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 24 Aug 2010 06:15:40 +0000 (06:15 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 24 Aug 2010 06:15:40 +0000 (06:15 +0000)
ERROR:capture.c:141:capture_start: assertion failed: (capture_opts->state == CAPTURE_STOPPED)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5126

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33906 f5534014-38df-0310-8fa8-9805f1628bb7

capture.c

index 2a7a261273a77d8dac05d9aa6aa5c18da2ef18ba..de5ce796331b5a3e41439bb46362dda333d7d82f 100644 (file)
--- a/capture.c
+++ b/capture.c
@@ -135,12 +135,13 @@ capture_start(capture_options *capture_opts)
   gboolean ret;
   GString *source = g_string_new("");
 
+  if (capture_opts->state != CAPTURE_STOPPED)
+         return FALSE;
+  capture_opts->state = CAPTURE_PREPARING;
+
   /* close the currently loaded capture file */
   cf_close(capture_opts->cf);
 
-  g_assert(capture_opts->state == CAPTURE_STOPPED);
-  capture_opts->state = CAPTURE_PREPARING;
-
   g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_MESSAGE, "Capture Start ...");
 
   g_string_printf(source, "%s", get_iface_description(capture_opts));