All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/1] sdl patch queue
@ 2015-06-11  8:37 Gerd Hoffmann
  2015-06-11  8:37 ` [Qemu-devel] [PULL 1/1] sdl2: fix crash in handle_windowevent() when restoring the screen size Gerd Hoffmann
  2015-06-11 14:33 ` [Qemu-devel] [PULL 0/1] sdl patch queue Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2015-06-11  8:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Single fix patch queue for sdl.

please pull,
  Gerd

The following changes since commit ee09f84e6bf5383a23c9624115c26b72aa1e076c:

  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2015-06-08 15:57:41 +0100)

are available in the git repository at:


  git://git.kraxel.org/qemu tags/pull-sdl-20150611-1

for you to fetch changes up to 08d49df0dbaacc220a099dbfb644e1dc0eda57be:

  sdl2: fix crash in handle_windowevent() when restoring the screen size (2015-06-09 10:25:21 +0200)

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

----------------------------------------------------------------
Alberto Garcia (1):
      sdl2: fix crash in handle_windowevent() when restoring the screen size

 ui/sdl2.c | 4 ++++
 1 file changed, 4 insertions(+)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PULL 1/1] sdl2: fix crash in handle_windowevent() when restoring the screen size
  2015-06-11  8:37 [Qemu-devel] [PULL 0/1] sdl patch queue Gerd Hoffmann
@ 2015-06-11  8:37 ` Gerd Hoffmann
  2015-06-11 14:33 ` [Qemu-devel] [PULL 0/1] sdl patch queue Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2015-06-11  8:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alberto Garcia, qemu-stable, Gerd Hoffmann

From: Alberto Garcia <berto@igalia.com>

The Ctrl-Alt-u keyboard shortcut restores the screen to its original
size. In the SDL2 UI this is done by destroying the window and
creating a new one. The old window emits SDL_WINDOWEVENT_HIDDEN when
it's destroyed, but trying to call SDL_GetWindowFromID() from that
event's window ID returns a null pointer. handle_windowevent() assumes
that the pointer is never null so it results in a crash.

Cc: qemu-stable@nongnu.org
Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/sdl2.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ui/sdl2.c b/ui/sdl2.c
index 2d60179..5cb75aa 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -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:
         {
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PULL 0/1] sdl patch queue
  2015-06-11  8:37 [Qemu-devel] [PULL 0/1] sdl patch queue Gerd Hoffmann
  2015-06-11  8:37 ` [Qemu-devel] [PULL 1/1] sdl2: fix crash in handle_windowevent() when restoring the screen size Gerd Hoffmann
@ 2015-06-11 14:33 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2015-06-11 14:33 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers

On 11 June 2015 at 09:37, Gerd Hoffmann <kraxel@redhat.com> wrote:
>   Hi,
>
> Single fix patch queue for sdl.
>
> please pull,
>   Gerd
>
> The following changes since commit ee09f84e6bf5383a23c9624115c26b72aa1e076c:
>
>   Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2015-06-08 15:57:41 +0100)
>
> are available in the git repository at:
>
>
>   git://git.kraxel.org/qemu tags/pull-sdl-20150611-1
>
> for you to fetch changes up to 08d49df0dbaacc220a099dbfb644e1dc0eda57be:
>
>   sdl2: fix crash in handle_windowevent() when restoring the screen size (2015-06-09 10:25:21 +0200)
>
> ----------------------------------------------------------------
> sdl2: fix crash in handle_windowevent() when restoring the screen size
>
> ----------------------------------------------------------------
> Alberto Garcia (1):
>       sdl2: fix crash in handle_windowevent() when restoring the screen size

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-11 14:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11  8:37 [Qemu-devel] [PULL 0/1] sdl patch queue Gerd Hoffmann
2015-06-11  8:37 ` [Qemu-devel] [PULL 1/1] sdl2: fix crash in handle_windowevent() when restoring the screen size Gerd Hoffmann
2015-06-11 14:33 ` [Qemu-devel] [PULL 0/1] sdl patch queue Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.