From d4683692e0ca310b3682279c3e446cf7277a3fe1 Mon Sep 17 00:00:00 2001 From: Marco Antognini Date: Sat, 10 Oct 2015 15:59:14 +0200 Subject: [PATCH] Fixed crash when resizing a window to a zero-height/width size (#984) --- src/SFML/Window/OSX/SFOpenGLView.mm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/SFML/Window/OSX/SFOpenGLView.mm b/src/SFML/Window/OSX/SFOpenGLView.mm index 137b7b0a..627af8f4 100644 --- a/src/SFML/Window/OSX/SFOpenGLView.mm +++ b/src/SFML/Window/OSX/SFOpenGLView.mm @@ -170,6 +170,17 @@ BOOL isValidTextUnicode(NSEvent* event); } +//////////////////////////////////////////////////////// +-(void)update +{ + // In order to prevent an infinite recursion when the window/view is + // resized to zero-height/width, we ignore update event when resizing. + if (![self inLiveResize]) { + [super update]; + } +} + + //////////////////////////////////////////////////////// -(void)finishInit {