Skip to content

Prevent Quartz/CoreGraphics runtime assertion failures. (GTK 3)

David Hogan requested to merge dqh/gtk:gtk-3-24-fix-runtime-assertions into gtk-3-24

gdk_window_impl_quartz_release_context () can be called with a NULL CGContextRef. This causes CoreGraphics assertion failures when debugging a Gtk application in Xcode, as the code was blindly passing that NULL to CGContextRestoreGState () and CGContextSetAllowsAntialiasing (). Given that the matching pair of CGContextSaveGState () and CGContextSetAllowsAntialiasing () calls are already checking for a NULL CGContextRef, it seems reasonable to wrap these calls in a NULL check.

Merge request reports