RPi: Patched to compile without OpenGL (thanks, Simon!), other cleanups.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 06 Jun 2015 22:45:22 -0400
changeset 9711 0a329b2a297f
parent 9710 38ca9a2dd2ef
child 9712 a964d651f1dd
RPi: Patched to compile without OpenGL (thanks, Simon!), other cleanups. Fixes Bugzilla #3003.
src/video/raspberry/SDL_rpivideo.c
--- a/src/video/raspberry/SDL_rpivideo.c	Fri Jun 05 19:41:34 2015 +0200
+++ b/src/video/raspberry/SDL_rpivideo.c	Sat Jun 06 22:45:22 2015 -0400
@@ -284,15 +284,14 @@
 void
 RPI_DestroyWindow(_THIS, SDL_Window * window)
 {
-    SDL_WindowData *data;
-        
-    if(window->driverdata) {
-        data = (SDL_WindowData *) window->driverdata;
+    SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
+    if(data) {
+#if SDL_VIDEO_OPENGL_EGL
         if (data->egl_surface != EGL_NO_SURFACE) {
             SDL_EGL_DestroySurface(_this, data->egl_surface);
-            data->egl_surface = EGL_NO_SURFACE;
         }
-        SDL_free(window->driverdata);
+#endif
+        SDL_free(data);
         window->driverdata = NULL;
     }
 }