]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/settings.cpp
Various changes to make pop up menus work
[wxWidgets.git] / src / msw / settings.cpp
index 85d8b311f4377f2ba7d334eee345d868b8880d1c..4793d47ff39e46635530ca39dc805c45cb140468 100644 (file)
@@ -25,6 +25,7 @@
 #endif
 
 #ifndef WX_PRECOMP
+    #include "wx/utils.h"
     #include "wx/gdicmn.h"
 #endif
 
@@ -332,7 +333,8 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index)
     // TODO: probably use wxUniv themes functionality
     return 0;
 #else // !__WXMICROWIN__
-    wxCHECK_MSG( index < WXSIZEOF(gs_metricsMap), 0, _T("invalid metric") );
+    wxCHECK_MSG( index > 0 && (size_t)index < WXSIZEOF(gs_metricsMap), 0,
+                 _T("invalid metric") );
 
     int indexMSW = gs_metricsMap[index];
     if ( indexMSW == -1 )