GNOME Bugzilla – Bug 738338
quartz: NSWindow NULL check in get_scale_factor
Last modified: 2015-04-26 04:26:48 UTC
Sending backingScaleFactor to a NULL NSWindow will silently give the value 0 for the scale factor, causing insidious divide-by-zero bugs down the line. This checks if the NSWindow is NULL first, as seems to happen throughout the rest of the file. Note that I don't have a hi-DPI OS X machine to test this on, though.
Created attachment 288265 [details] [review] quartz: NSWindow NULL check in get_scale_factor Sending backingScaleFactor to a NULL NSWindow will silently give the value 0 for the scale factor, causing insidious divide-by-zero bugs down the line. This checks if the NSWindow is NULL first, as seems to happen throughout the rest of the file. Note that I don't have a hi-DPI OS X machine to test this on, though.
Comment on attachment 288265 [details] [review] quartz: NSWindow NULL check in get_scale_factor Seems perfectly reasonable. Committed to master.