- void ** const data = &itemsData[0];
- if ( HasClientObjectData() )
- Append(items, wx_reinterpret_cast(wxClientData **, data));
- else
- Append(items, data);
+ if ( count > 1 )
+ {
+ void ** const data = &itemsData[0];
+ if ( HasClientObjectData() )
+ Append(items, wx_reinterpret_cast(wxClientData **, data));
+ else
+ Append(items, data);
+ }
+ //else: the control is now empty, nothing to append