mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
SDL_os2messagebox.c (_makeDlg): fix crash if title and/or message is NULL.
c.f.: bug #5253.
This commit is contained in:
parent
bf7d198d48
commit
082558db33
0
Xcode/SDL/SDL.xcodeproj/project.pbxproj
Executable file → Normal file
0
Xcode/SDL/SDL.xcodeproj/project.pbxproj
Executable file → Normal file
@ -205,9 +205,12 @@ static HWND _makeDlg(const SDL_MessageBoxData *messageboxdata)
|
||||
pSDLBtnData = (SDL_MessageBoxButtonData *)messageboxdata->buttons;
|
||||
ULONG cSDLBtnData = messageboxdata->numbuttons;
|
||||
|
||||
PSZ pszTitle = OS2_UTF8ToSys((PSZ) messageboxdata->title);
|
||||
PSZ pszTitle = (messageboxdata->title == NULL)? NULL :
|
||||
OS2_UTF8ToSys((PSZ) messageboxdata->title);
|
||||
ULONG cbTitle = (pszTitle == NULL)? 0 : strlen(pszTitle);
|
||||
PSZ pszText = OS2_UTF8ToSys((PSZ) messageboxdata->message);
|
||||
|
||||
PSZ pszText = (messageboxdata->message == NULL)? NULL :
|
||||
OS2_UTF8ToSys((PSZ) messageboxdata->message);
|
||||
ULONG cbText = (pszText == NULL)? 0 : strlen(pszText);
|
||||
|
||||
PDLGTEMPLATE pTemplate;
|
||||
|
Loading…
Reference in New Issue
Block a user