X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4e07c80645d02aa5560841d64351ecbefa67d0c1..7c60222510bc5e197b12f153c4bf05db66cb0f4a:/src/osx/utils_osx.cpp?ds=sidebyside diff --git a/src/osx/utils_osx.cpp b/src/osx/utils_osx.cpp index da98e5371a..438f7ddbf0 100644 --- a/src/osx/utils_osx.cpp +++ b/src/osx/utils_osx.cpp @@ -248,7 +248,7 @@ CGColorRef wxMacCreateCGColorFromHITheme( ThemeBrush brush ) { const int maxcachedbrush = 58+5; // negative indices are for metabrushes, cache down to -5) int brushindex = brush+5; - if ( brushindex < 0 || brush > brushindex ) + if ( brushindex < 0 || brushindex > maxcachedbrush ) { CGColorRef color ; HIThemeBrushCreateCGColor( brush, &color );