Fixed crash on Mac for large Windows

In some cases a resize event can happen before we have setup our user-data. Now we make sure that user data is present before using it

Closes #26
This commit is contained in:
Daniel Collin 2016-07-31 18:05:11 +02:00
parent 31215a5b21
commit 26d41d1d07

View file

@ -128,8 +128,11 @@
{
NSSize size = [self bounds].size;
OSXWindow* window = (OSXWindow*)[self window];
if (window->shared_data) {
window->shared_data->width = (int)(size.width);
window->shared_data->height = (int)(size.height);
}
}
@end