- // we need to preserve the client data
- void *data;
- if ( m_clientDataItemsType != wxClientData_None )
- {
- data = DoGetItemClientData(n);
- }
- else // no client data
- {
- data = NULL;
- }
+ // we need to preserve the client data manually
+ void *oldData = NULL;
+ wxClientData *oldObjData = NULL;
+ if ( HasClientUntypedData() )
+ oldData = GetClientData(n);
+ else if ( HasClientObjectData() )
+ oldObjData = GetClientObject(n);