Permalink
Browse files

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

  • Loading branch information...
1 parent f9abf5e commit f48223666554e67421e77afe30c9c0368c361eb9 @piscisaureus piscisaureus committed Jun 7, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/platform_win32.cc
@@ -155,7 +155,9 @@ static inline char* _getProcessTitle() {
result = GetConsoleTitleW(title_w, sizeof(title_w) / sizeof(WCHAR));
if (result == 0) {
- winapi_perror("GetConsoleTitleW");
+ if (GetLastError() != ERROR_SUCCESS) {
+ winapi_perror("GetConsoleTitleW");
+ }
return NULL;
}

0 comments on commit f482236

Please sign in to comment.