From 151571bbe4823ba955f9b617e970ed075a49927c Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 2 Jan 2006 07:09:52 +0000 Subject: [PATCH] Quartz target shouldn't crash if an event thread is used. (SDL_INIT_EVENTTHREAD still doesn't work, but the crash is gone...) --- src/video/quartz/SDL_QuartzEvents.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video/quartz/SDL_QuartzEvents.m b/src/video/quartz/SDL_QuartzEvents.m index cc9b628ea..88c6d52dd 100644 --- a/src/video/quartz/SDL_QuartzEvents.m +++ b/src/video/quartz/SDL_QuartzEvents.m @@ -709,6 +709,9 @@ void QZ_PumpEvents (_THIS) NSRect winRect; NSAutoreleasePool *pool; + if (!SDL_VideoSurface) + return; /* don't do anything if there's no screen surface. */ + /* Update activity every five seconds to prevent screensaver. --ryan. */ static Uint32 screensaverTicks = 0; Uint32 nowTicks = SDL_GetTicks();