mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-26 07:43:36 +01:00
Avoid crash of paste null string to UI's text
This commit is contained in:
1 parent
590724ea5c
commit
ad3c8ebaa0
1 file changed
+4
-1
+4
-1
@@ -170,7 +170,10 @@ std::string System_GetProperty(SystemProperty prop) {
|
||||
if (OpenClipboard(MainWindow::GetDisplayHWND())) {
|
||||
HANDLE handle = GetClipboardData(CF_UNICODETEXT);
|
||||
const wchar_t *wstr = (const wchar_t*)GlobalLock(handle);
|
||||
retval = ConvertWStringToUTF8(wstr);
|
||||
if (wstr)
|
||||
retval = ConvertWStringToUTF8(wstr);
|
||||
else
|
||||
retval = "";
|
||||
GlobalUnlock(handle);
|
||||
CloseClipboard();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user