sdl2: fix crash in handle_windowevent() when restoring the screen size

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJVeT9yAAoJEEy22O7T6HE4180P/itdfXhzoOv/6AdXos4X13WH
 bmwlLBkw/0saRzVBTIJ5zAKxNZ2nkpee6ORMf42asjYSgXcQTgRzZwUw+FdClmd6
 igcm1+eWzo7W1GjWoqK2TMKpm0bywHP13JKchLp6AShRiim6ymXybgOzzDNd3g08
 W7pvJDL1chIt5jqtu0KC/bkQuJhh0Mz0rVzB+LYNSgKGWyOndQZZD51eZIY7X7qW
 pxHWRZyYWbXx2obrYHgcfaxsXcemlishzdhxG9Sm6qIt2B/zi3lGeSg9SKCwX6Ft
 TVlazv+2Dl8J2Tx+aAkQHGdOcSbV/GWCa5vQo89MOY20SpZd+PbdJkM+mbnW5QuL
 qMyMPdW/lYi+a2wtZifzY+eiEwnExL5sKHaFlQ3a94akPRZujCuMi5Xk3heJBVvF
 jjKNNrO2VfcdOFjOQSFMrh/KIEuzxdpy6HoP3iekhhmB86KrwL1qRO5gLcvoP7wK
 aYnNevKmWBwIVGHRQxNQaCSpz7VLLK9MrF/h8YJbCDhKdNde4fOhogUER35EJ1Vx
 mxJufEn2jd9r7ylEDrvedEkCH+m92eCQ23JHCwustlW+Yfx2xUSrRb4P/JRJE3e1
 TLgh7azBXh0Tct8/guV1TVJf2dJ8VZDmVuYaGpv6PidWFhfIBIkPVnKRKDU/k3wS
 1RtEewSb7jJk2B/Ovm+4
 =t2/C
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-sdl-20150611-1' into staging

sdl2: fix crash in handle_windowevent() when restoring the screen size

# gpg: Signature made Thu Jun 11 08:57:38 2015 BST using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"

* remotes/kraxel/tags/pull-sdl-20150611-1:
  sdl2: fix crash in handle_windowevent() when restoring the screen size

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2015-06-11 14:40:25 +01:00
commit afa25c4bb5

View File

@ -521,6 +521,10 @@ static void handle_windowevent(SDL_Event *ev)
{
struct sdl2_console *scon = get_scon_from_window(ev->window.windowID);
if (!scon) {
return;
}
switch (ev->window.event) {
case SDL_WINDOWEVENT_RESIZED:
{