comparison src/video/x11/SDL_x11window.c @ 4937:24d44c7c4c63

Don't crash when resizing non-shaped windows
author Sam Lantinga <slouken@libsdl.org>
date Fri, 31 Dec 2010 08:50:06 -0800
parents 50d0bff24d81
children 5e3291605ad0
comparison
equal deleted inserted replaced
4936:e99358ca7a8d 4937:24d44c7c4c63
940 X11_SetWindowSize(_THIS, SDL_Window * window) 940 X11_SetWindowSize(_THIS, SDL_Window * window)
941 { 941 {
942 SDL_WindowData *data = (SDL_WindowData *) window->driverdata; 942 SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
943 Display *display = data->videodata->display; 943 Display *display = data->videodata->display;
944 944
945 if(SDL_IsShapedWindow(window)) 945 if (SDL_IsShapedWindow(window))
946 X11_ResizeWindowShape(window); 946 X11_ResizeWindowShape(window);
947 XResizeWindow(display, data->xwindow, window->w, window->h); 947 XResizeWindow(display, data->xwindow, window->w, window->h);
948 } 948 }
949 949
950 void 950 void