Don't close a wtap that you don't have open in the first place.

Change-Id: I4d9d539957d06cb3568df287eb36ecc34677373f
Reviewed-on: https://code.wireshark.org/review/21170
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2017-04-17 17:09:26 -07:00
parent 3fac48da68
commit c9bb6b8282
1 changed files with 2 additions and 1 deletions

View File

@ -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