diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index 723443cdb3..b8367bbe67 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -615,7 +615,7 @@ wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const } else { - [view bitmapImageRepForCachingDisplayInRect:[view bounds]]; + rep = [view bitmapImageRepForCachingDisplayInRect:[view bounds]]; [view cacheDisplayInRect:[view bounds] toBitmapImageRep:rep]; }