src/video/quartz/SDL_QuartzVideo.m
branchSDL-1.2
changeset 5568 abe7d0b3539b
parent 5550 80ae1ac3bdc9
child 5569 d81e8404bd7f
--- a/src/video/quartz/SDL_QuartzVideo.m	Thu Jul 14 15:40:07 2011 +0200
+++ b/src/video/quartz/SDL_QuartzVideo.m	Sun Jul 17 01:03:13 2011 -0700
@@ -1252,7 +1252,7 @@
      * Always get latest bitmap address and rowbytes for the screen surface;
      *  they can change dynamically (user has multiple monitors, etc).
      */
-    if (surface == SDL_VideoSurface) {
+    if ((surface == SDL_VideoSurface) && (surface->flags & SDL_HWSURFACE)) {
         surface->pixels = (void*) CGDisplayBaseAddress (kCGDirectMainDisplay);
         surface->pitch  = CGDisplayBytesPerRow (kCGDirectMainDisplay);
         return (surface->pixels != NULL);