From: Robert Roebling Date: Wed, 4 Oct 2006 13:21:56 +0000 (+0000) Subject: Fix warning for unknown menu stock id. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/97c7099a70fd3af6ac7bef7f420581c8801ba22d?ds=sidebyside Fix warning for unknown menu stock id. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/stockitem.cpp b/src/common/stockitem.cpp index dadb606182..ee38d92f20 100644 --- a/src/common/stockitem.cpp +++ b/src/common/stockitem.cpp @@ -380,6 +380,9 @@ const char *wxGetStockGtkID(wxWindowID id) bool wxGetStockGtkAccelerator(const char *id, GdkModifierType *mod, guint *key) { + if (!id) + return false; + GtkStockItem stock_item; if (gtk_stock_lookup (id, &stock_item)) {