diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index a2974367c2..6fd76e988f 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -2820,11 +2820,20 @@ wxDataViewBitmapRenderer::wxDataViewBitmapRenderer(const wxString& varianttype, // In all other cases the method returns 'false'. bool wxDataViewBitmapRenderer::MacRender() { - wxBitmap bitmap; - - bitmap << GetValue(); - if (bitmap.IsOk()) - [GetNativeData()->GetItemCell() setObjectValue:[[bitmap.GetNSImage() retain] autorelease]]; + if (GetValue().GetType() == wxS("wxBitmap")) + { + wxBitmap bitmap; + bitmap << GetValue(); + if (bitmap.IsOk()) + [GetNativeData()->GetItemCell() setObjectValue:[[bitmap.GetNSImage() retain] autorelease]]; + } + else if (GetValue().GetType() == wxS("wxIcon")) + { + wxIcon icon; + icon << GetValue(); + if (icon.IsOk()) + [GetNativeData()->GetItemCell() setObjectValue:[[icon.GetNSImage() retain] autorelease]]; + } return true; }