summaryrefslogtreecommitdiffstats
path: root/player/main-fn-win.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/main-fn-win.c')
-rw-r--r--player/main-fn-win.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/main-fn-win.c b/player/main-fn-win.c
index ad883dcba9..28fc5b3c24 100644
--- a/player/main-fn-win.c
+++ b/player/main-fn-win.c
@@ -14,7 +14,8 @@ int _dowildcard = 0;
static bool is_valid_handle(HANDLE h)
{
- return h != INVALID_HANDLE_VALUE && h != NULL;
+ return h != INVALID_HANDLE_VALUE && h != NULL &&
+ GetFileType(h) != FILE_TYPE_UNKNOWN;
}
static bool has_redirected_stdio(void)