]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix warning for unknown menu stock id.
authorRobert Roebling <robert@roebling.de>
Wed, 4 Oct 2006 13:21:56 +0000 (13:21 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 4 Oct 2006 13:21:56 +0000 (13:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/stockitem.cpp

index dadb60618262802f2632e1f39e18f90b57c3895e..ee38d92f204cda59b6e0e7109a09cb09033ee448 100644 (file)
@@ -380,6 +380,9 @@ const char *wxGetStockGtkID(wxWindowID id)
 
 bool wxGetStockGtkAccelerator(const char *id, GdkModifierType *mod, guint *key)
 {
 
 bool wxGetStockGtkAccelerator(const char *id, GdkModifierType *mod, guint *key)
 {
+    if (!id)
+        return false;
+
     GtkStockItem stock_item;
     if (gtk_stock_lookup (id, &stock_item))
     {
     GtkStockItem stock_item;
     if (gtk_stock_lookup (id, &stock_item))
     {