# HG changeset patch # User ib # Date 1391895708 0 # Node ID 9ba7cfbe20c94b1ab1b6448f9636257d48da6b1a # Parent bcc482b14d398e801c3588bf165dab9afae4f82a Fix usage of acp(). A call to acp() frees the previous string it has allocated which means that there must not be two acp() calls as arguments to a function. Based on a patch by Stephen Sheldon, sfsheldo gmail com. diff -r bcc482b14d39 -r 9ba7cfbe20c9 gui/win32/preferences.c --- a/gui/win32/preferences.c Sat Feb 08 20:41:35 2014 +0000 +++ b/gui/win32/preferences.c Sat Feb 08 21:41:48 2014 +0000 @@ -543,6 +543,8 @@ case ID_APPLY: { int strl; + char *caption; + if(guiInfo.Playing) gui(GUI_SET_STATE, (void *)GUI_STOP); /* Set the video driver */ @@ -632,7 +634,9 @@ else if(SendDlgItemMessage(hwnd, ID_OSD3, BM_GETCHECK, 0, 0) == BST_CHECKED) osd_level = 3; - MessageBox(hwnd, acp(MSGTR_GUI_MSG_PlaybackNeedsRestart), acp(MSGTR_GUI_Warning), MB_OK); + caption = strdup(acp(MSGTR_GUI_Warning)); + MessageBox(hwnd, acp(MSGTR_GUI_MSG_PlaybackNeedsRestart), caption, MB_OK); + free(caption); DestroyWindow(hwnd); break; }