Skip to content

Commit

Permalink
Added HAVE_LIBPCAP guards
Browse files Browse the repository at this point in the history
The info_data struct is only when HAVE_LIBPCAP.

Change-Id: I30a3f974cbe3c1474bfe288b222f5871d674bada
Reviewed-on: https://code.wireshark.org/review/12846
Reviewed-by: Stig Bjørlykke <[email protected]>
  • Loading branch information
stigbjorlykke committed Dec 23, 2015
1 parent 35ee09e commit 8bd1353
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/gtk/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3181,8 +3181,10 @@ main(int argc, char *argv[])
/* the window can be sized only, if it's not already shown, so do it now! */
main_load_window_geometry(top_level);

#ifdef HAVE_LIBPCAP
/* initialize the packet counters */
global_info_data.counts.counts_hash = NULL;
#endif

g_timeout_add(info_update_freq, resolv_update_cb, NULL);

Expand Down
2 changes: 2 additions & 0 deletions ui/qt/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,10 @@ MainWindow::MainWindow(QWidget *parent) :
plugin_if_register_gui_cb(PLUGIN_IF_PREFERENCE_SAVE, plugin_if_mainwindow_preference);
plugin_if_register_gui_cb(PLUGIN_IF_GOTO_FRAME, plugin_if_mainwindow_gotoframe);

#ifdef HAVE_LIBPCAP
/* Initialize packet counter */
info_data_.counts.counts_hash = NULL;
#endif

main_ui_->mainStack->setCurrentWidget(main_welcome_);
}
Expand Down

0 comments on commit 8bd1353

Please sign in to comment.