]> 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 b2788d0aae7f2f3edbfa82974bdbf9962df71ce6..4793d47ff39e46635530ca39dc805c45cb140468 100644 (file)
@@ -333,7 +333,8 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index)
     // TODO: probably use wxUniv themes functionality
     return 0;
 #else // !__WXMICROWIN__
     // 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 )
 
     int indexMSW = gs_metricsMap[index];
     if ( indexMSW == -1 )