]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/stockitem.cpp
don't crash on weird line endings like \r\r\n
[wxWidgets.git] / 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)
 {
+    if (!id)
+        return false;
+
     GtkStockItem stock_item;
     if (gtk_stock_lookup (id, &stock_item))
     {