From 8b696f70b8808f97594a4cb22b02d00cea9af0ff Mon Sep 17 00:00:00 2001 From: Ulf Lamping Date: Mon, 3 Oct 2005 20:04:06 +0000 Subject: Win32: don't crash if Capture/Start is clicked and WinPcap is not installed. svn path=/trunk/; revision=16093 --- gtk/capture_dlg.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'gtk/capture_dlg.c') diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c index 26bfd545fe..f5a91e790d 100644 --- a/gtk/capture_dlg.c +++ b/gtk/capture_dlg.c @@ -1263,6 +1263,29 @@ capture_start_cb(GtkWidget *w _U_, gpointer d _U_) { gpointer dialog; +#ifdef _WIN32 + /* Is WPcap loaded? */ + if (!has_wpcap) { + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, + "Unable to load WinPcap (wpcap.dll); Ethereal will not be able\n" + "to capture packets.\n\n" + "In order to capture packets, WinPcap must be installed; see\n" + "\n" + " http://www.winpcap.org/\n" + "\n" + "or the mirror at\n" + "\n" + " http://winpcap.mirror.ethereal.com/\n" + "\n" + "or the mirror at\n" + "\n" + " http://www.mirrors.wiretapped.net/security/packet-capture/winpcap/\n" + "\n" + "for a downloadable version of WinPcap and for instructions\n" + "on how to install WinPcap."); + return; + } +#endif /* get the values and close the options dialog */ if(cap_open_w) { -- cgit v1.2.3