diff options
| author | George Hazan <george.hazan@gmail.com> | 2023-12-07 13:18:36 +0300 |
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2023-12-07 13:18:36 +0300 |
| commit | f45c6111f5b86d327e30b3709c92321248534398 (patch) | |
| tree | 90487e26dc56f4aff81f7ffbd92b4425b6019b81 /plugins | |
| parent | 7b2896b91ed33fe16b7dcd1213c01c004a85a4e8 (diff) | |
fixes #4006 (NewStory: crash when editing Jabber messages)
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/NewStory/src/history_control.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index 2a35563195..dfa7669dee 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -328,7 +328,8 @@ void NewstoryListData::EndEditItem(bool bAccept) auto *pItem = GetItem(caret); int iTextLen = GetWindowTextLengthW(hwndEditBox); - replaceStrW(pItem->wtext, (wchar_t *)mir_alloc((iTextLen + 1) * sizeof(wchar_t))); + mir_free(pItem->wtext); + pItem->wtext = (wchar_t *)mir_alloc((iTextLen + 1) * sizeof(wchar_t)); GetWindowTextW(hwndEditBox, pItem->wtext, iTextLen+1); pItem->wtext[iTextLen] = 0; |
