Review request for 7142780: [macosx] Font2DTest demo throws NPE

Andrew Brygin andrew.brygin at
Mon Feb 6 01:07:48 PST 2012


please take a look to a fix for CR 7142780:

The Font2DTest creates a bogus image in order to get a blank cursor
(, lines 495 - 498). This image can not be loaded and triggers
an error when MediaTracker tries to prepare the image. As soon as the error
is detected, the conversion of toolkit image to CImage is aborted, and the
CImage.Creator.createFromImage returns null. So, CCustomCursor.getImageData
need to be modified in order to be able to handle a null result of the 

However, in order to avoid numerous calls to createFromImage in case of 
image, we can check the status of image loading in the constructor, and 
set a flag
to indicate whether given image can be used as a cursor.


More information about the macosx-port-dev mailing list