Browse Source

windows: don't print error when GetConsoleTitleW returns an empty string

v0.8.7-release
Bert Belder 13 years ago
parent
commit
f482236665
  1. 4
      src/platform_win32.cc

4
src/platform_win32.cc

@ -155,7 +155,9 @@ static inline char* _getProcessTitle() {
result = GetConsoleTitleW(title_w, sizeof(title_w) / sizeof(WCHAR)); result = GetConsoleTitleW(title_w, sizeof(title_w) / sizeof(WCHAR));
if (result == 0) { if (result == 0) {
winapi_perror("GetConsoleTitleW"); if (GetLastError() != ERROR_SUCCESS) {
winapi_perror("GetConsoleTitleW");
}
return NULL; return NULL;
} }

Loading…
Cancel
Save