13
0

expand null/destroyed tests for gdk objects in NSView methods

This commit is contained in:
Paul Davis 2024-04-19 10:42:59 -06:00
parent e64a071e39
commit c96e12ba58

View File

@ -604,7 +604,7 @@
- (void) setNeedsDisplay:(BOOL)yn
{
if (GDK_WINDOW_DESTROYED (gdk_window)) {
if (!gdk_window || GDK_WINDOW_DESTROYED (gdk_window)) {
[super setNeedsDisplay:yn];
return;
}
@ -643,6 +643,11 @@
- (void) setNeedsDisplayInRect:(NSRect)rect
{
if (!gdk_window || GDK_WINDOW_DESTROYED (gdk_window)) {
[super setNeedsDisplayInRect:rect];
return;
}
GdkWindowObject* private = GDK_WINDOW_OBJECT (gdk_window);
GdkWindowImplQuartz* impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);