Commit 255c2739 authored by Kristian Rietveld's avatar Kristian Rietveld

Fix memleak in get_nsscreen_for_point()

One codepath did not go through GDK_QUARTZ_RELEASE_POOL, refactored
the code to fix this.
parent 38878382
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment