mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 09:36:33 +01:00
expand null/destroyed tests for gdk objects in NSView methods
This commit is contained in:
parent
e64a071e39
commit
c96e12ba58
1 changed files with 8 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue