[PATCH v3] comctl32: Handle NULL text in COMBOEX_NotifyEndEdit().
Haoyang Chen
chenhaoyang at uniontech.com
Thu Jul 8 20:48:42 CDT 2021
Signed-off-by: Haoyang Chen <chenhaoyang at uniontech.com>
---
dlls/comctl32/comboex.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c
index 0f7e46949e4..cc3b03030bd 100644
--- a/dlls/comctl32/comboex.c
+++ b/dlls/comctl32/comboex.c
@@ -223,7 +223,10 @@ static INT COMBOEX_NotifyEndEdit (const COMBOEX_INFO *infoPtr, NMCBEENDEDITW *ne
{
/* Change the Text item from Unicode to ANSI if necessary for NOTIFY */
if (infoPtr->NtfUnicode) {
- lstrcpynW(neew->szText, wstr, CBEMAXSTRLEN);
+ if (!wstr)
+ neew->szText[0] = 0;
+ else
+ lstrcpynW(neew->szText, wstr, CBEMAXSTRLEN);
return COMBOEX_Notify (infoPtr, CBEN_ENDEDITW, &neew->hdr);
} else {
NMCBEENDEDITA neea;
--
2.20.1
More information about the wine-devel
mailing list