summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2012-06-07 19:44:31 +0200
committerBert Belder <bertbelder@gmail.com>2012-06-07 19:44:31 +0200
commitf48223666554e67421e77afe30c9c0368c361eb9 (patch)
tree52ca6297e015359fdec9e481a882d05063c21efe
parentf9abf5e0e22974bd14c1dc792b0ae41ff6e6475c (diff)
downloadnode-f48223666554e67421e77afe30c9c0368c361eb9.tar.gz
windows: don't print error when GetConsoleTitleW returns an empty string
-rw-r--r--src/platform_win32.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/platform_win32.cc b/src/platform_win32.cc
index c84131a70..f43c24337 100644
--- a/src/platform_win32.cc
+++ b/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;
}