mirror of https://github.com/libsdl-org/SDL
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
|
@ -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