X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..d22e07bf6c1c3cfcc6e5a5a25d4fcfa8ee385bf4:/src/common/ctrlsub.cpp diff --git a/src/common/ctrlsub.cpp b/src/common/ctrlsub.cpp index d0a197da1f..68d4b1a591 100644 --- a/src/common/ctrlsub.cpp +++ b/src/common/ctrlsub.cpp @@ -191,6 +191,18 @@ wxClientData *wxItemContainer::GetClientObject(unsigned int n) const return static_cast(DoGetItemClientData(n)); } +wxClientData *wxItemContainer::DetachClientObject(unsigned int n) +{ + wxClientData * const data = GetClientObject(n); + if ( data ) + { + // reset the pointer as we don't own it any more + DoSetItemClientData(n, NULL); + } + + return data; +} + void wxItemContainer::SetClientData(unsigned int n, void *data) { if ( !HasClientData() )