summaryrefslogtreecommitdiff
path: root/editcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'editcap.c')
-rw-r--r--editcap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/editcap.c b/editcap.c
index 7d1e2a40c5..5efa2cbc8f 100644
--- a/editcap.c
+++ b/editcap.c
@@ -1906,7 +1906,8 @@ clean_exit:
wtap_block_array_free(shb_hdrs);
wtap_block_array_free(nrb_hdrs);
g_free(idb_inf);
- wtap_close(wth);
+ if (wth != NULL)
+ wtap_close(wth);
wtap_cleanup();
free_progdirs();
#ifdef HAVE_PLUGINS