- wxASSERT(type < m_icons.GetCount());
-
- if (type >= m_icons.GetCount())
- {
- wxLogError(_("Invalid request for icon type!"));
- wxIcon null;
- return null;
- }
+ wxCHECK_MSG(type < (int)m_icons.GetCount(), wxNullIcon,
+ _T("Invalid request for icon type!"));
+ wxCHECK_MSG( type >= 0 && (size_t)type < m_icons.GetCount(),
+ wxIcon(),
+ _T("invalid icon index") );