Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files

Date: Sat, 21 Mar 2009 19:41:52 -0700 (PDT)

From: Mason Wheeler
Subject: [SDL] Critical SDL 1.3 patch

Displaying a window created with SDL_CreateWindowFrom was causing stack overf
lows for me under certain conditions.  After far too much work trying to get
Visual Studio's debugger to play nice with a program written in Delphi, I tra
cked it down to a nasty reentrancy cycle in the WndProc handling.  Here's a p
atch that fixes the problem
  • Loading branch information
slouken committed Mar 23, 2009
1 parent 8a9603d commit 6b4c9756540072a9e65dbc76b927397dda2dabfe
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/video/win32/SDL_win32events.c
@@ -570,6 +570,17 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
return (0);

/* If this isn't our window, we don't need to repaint the frame.
This fixes a reentrancy issue that can cause stack overflows with foreign windows.
3/21/09 Mason Wheeler */
if (SDL_GetWindowFlags(data->windowID) && SDL_WINDOW_FOREIGN) {

/* We'll do our own drawing, prevent flicker */

0 comments on commit 6b4c975

Please sign in to comment.