From 97c7099a70fd3af6ac7bef7f420581c8801ba22d Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Wed, 4 Oct 2006 13:21:56 +0000 Subject: [PATCH] Fix warning for unknown menu stock id. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/stockitem.cpp | 3 +++ 1 file changed, 3 insertions(+) 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)) { -- 2.47.2