Mac OS: fixed a crash when printing window with OS 10.5

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9804 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2013-01-19 14:07:34 +00:00
parent 511c14e47d
commit 161bdb8973

View File

@ -3521,7 +3521,7 @@ CGImageRef Fl_X::CGImage_from_window_rect(Fl_Window *win, int x, int y, int w, i
// CFRelease the returned CGImageRef after use
{
CGImageRef img;
if (fl_mac_os_version >= 100500) {
if (fl_mac_os_version >= 100600) { // crashes with 10.5
NSBitmapImageRep *bitmap = rect_to_NSBitmapImageRep(win, x, y, w, h);
img = (CGImageRef)[bitmap performSelector:@selector(CGImage)]; // requires Mac OS 10.5
CGImageRetain(img);