forked from AuroraMiddleware/gtk
Fix memleak in get_nsscreen_for_point()
One codepath did not go through GDK_QUARTZ_RELEASE_POOL, refactored the code to fix this.
This commit is contained in:
parent
3887838244
commit
255c2739e2
@ -890,6 +890,7 @@ get_nsscreen_for_point (gint x, gint y)
|
||||
{
|
||||
int i;
|
||||
NSArray *screens;
|
||||
NSScreen *screen = NULL;
|
||||
|
||||
GDK_QUARTZ_ALLOC_POOL;
|
||||
|
||||
@ -901,12 +902,15 @@ get_nsscreen_for_point (gint x, gint y)
|
||||
|
||||
if (x >= rect.origin.x && x <= rect.origin.x + rect.size.width &&
|
||||
y >= rect.origin.y && y <= rect.origin.y + rect.size.height)
|
||||
return [screens objectAtIndex:i];
|
||||
{
|
||||
screen = [screens objectAtIndex:i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
GDK_QUARTZ_RELEASE_POOL;
|
||||
|
||||
return NULL;
|
||||
return screen;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user