mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Avoid crash of paste null string to UI's text
This commit is contained in:
parent
590724ea5c
commit
ad3c8ebaa0
1 changed files with 4 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue