+ // temp. variable needed to fix Borland C++ 5.5.1 problem
+ // with passing a return value through two functions
+ wxIcon *tmp;
+
+ size_t max = m_icons.GetCount();
+
+ // if we have one or no icon, we can return now without doing more work:
+ if ( max <= 1 )
+ {
+ if ( max == 1 ) // fix for broken BCC
+ tmp = &m_icons[0];
+ else // max == 0
+ tmp = &wxNullIcon;
+ return *tmp;
+ }
+
+ // there are more icons, find the best match: