expand null/destroyed tests for gdk objects in NSView methods
This commit is contained in:
parent
e64a071e39
commit
c96e12ba58
@ -604,7 +604,7 @@
|
|||||||
|
|
||||||
- (void) setNeedsDisplay:(BOOL)yn
|
- (void) setNeedsDisplay:(BOOL)yn
|
||||||
{
|
{
|
||||||
if (GDK_WINDOW_DESTROYED (gdk_window)) {
|
if (!gdk_window || GDK_WINDOW_DESTROYED (gdk_window)) {
|
||||||
[super setNeedsDisplay:yn];
|
[super setNeedsDisplay:yn];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -643,12 +643,17 @@
|
|||||||
|
|
||||||
- (void) setNeedsDisplayInRect:(NSRect)rect
|
- (void) setNeedsDisplayInRect:(NSRect)rect
|
||||||
{
|
{
|
||||||
|
if (!gdk_window || GDK_WINDOW_DESTROYED (gdk_window)) {
|
||||||
|
[super setNeedsDisplayInRect:rect];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GdkWindowObject* private = GDK_WINDOW_OBJECT (gdk_window);
|
GdkWindowObject* private = GDK_WINDOW_OBJECT (gdk_window);
|
||||||
GdkWindowImplQuartz* impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
|
GdkWindowImplQuartz* impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
|
||||||
|
|
||||||
if (!impl) {
|
if (!impl) {
|
||||||
[super setNeedsDisplayInRect:rect];
|
[super setNeedsDisplayInRect:rect];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GdkRectangle r = { rect.origin.x, rect.origin.y, rect.size.width, rect.size.height };
|
GdkRectangle r = { rect.origin.x, rect.origin.y, rect.size.width, rect.size.height };
|
||||||
|
Loading…
Reference in New Issue
Block a user