From f9334351bbe94ec92d067fe6c20e958a71e3a5db Mon Sep 17 00:00:00 2001
From: George Hazan <ghazan@miranda.im>
Date: Mon, 16 Dec 2019 18:14:19 +0300
Subject: shitty Windows helpers...

---
 plugins/DbEditorPP/src/settinglist.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'plugins/DbEditorPP/src')

diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp
index 9c609515c1..54323be704 100644
--- a/plugins/DbEditorPP/src/settinglist.cpp
+++ b/plugins/DbEditorPP/src/settinglist.cpp
@@ -266,8 +266,10 @@ void updateListItem(int index, const char *setting, DBVARIANT *dbv, int resident
 	case DBVT_UTF8:
 		lvi.iImage = IMAGE_UNICODE;
 		ListView_SetItem(hwnd2List, &lvi);
-		ListView_SetItemText(hwnd2List, index, 1, ptrW(mir_utf8decodeW(dbv->pszVal)));
-
+		{
+			ptrW wszText(mir_utf8decodeW(dbv->pszVal));
+			ListView_SetItemText(hwnd2List, index, 1, wszText);
+		}
 		length = (int)mir_strlen(dbv->pszVal) + 1;
 		mir_snwprintf(data, L"0x%04X (%u)", length, length);
 		ListView_SetItemText(hwnd2List, index, 3, data);
-- 
cgit v1.2.3