src/video/x11/SDL_x11video.c
changeset 6367 3c1253baeaec
parent 6331 5732e1a80bde
child 6369 a92fbd27127b
equal deleted inserted replaced
6365:975e23e06124 6367:3c1253baeaec
   146 
   146 
   147 #if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
   147 #if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
   148     device->gles_data = (struct SDL_PrivateGLESData *) SDL_calloc(1, sizeof(SDL_PrivateGLESData));
   148     device->gles_data = (struct SDL_PrivateGLESData *) SDL_calloc(1, sizeof(SDL_PrivateGLESData));
   149     if (!device->gles_data) {
   149     if (!device->gles_data) {
   150         SDL_OutOfMemory();
   150         SDL_OutOfMemory();
       
   151         SDL_free(device->driverdata);
       
   152         SDL_free(device);
   151         return NULL;
   153         return NULL;
   152     }
   154     }
   153 #endif
   155 #endif
   154 
   156 
   155     /* FIXME: Do we need this?
   157     /* FIXME: Do we need this?
   173         SDL_Delay(1000);
   175         SDL_Delay(1000);
   174         data->display = XOpenDisplay(display);
   176         data->display = XOpenDisplay(display);
   175     }
   177     }
   176 #endif
   178 #endif
   177     if (data->display == NULL) {
   179     if (data->display == NULL) {
       
   180 #if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
       
   181         SDL_free(device->gles_data);
       
   182 #endif
       
   183         SDL_free(device->driverdata);
   178         SDL_free(device);
   184         SDL_free(device);
   179         SDL_SetError("Couldn't open X11 display");
   185         SDL_SetError("Couldn't open X11 display");
   180         return NULL;
   186         return NULL;
   181     }
   187     }
   182 #ifdef X11_DEBUG
   188 #ifdef X11_DEBUG