diff --git a/src/file_io.c b/src/file_io.c
index 47351bc..54741c9 100644
--- a/src/file_io.c
+++ b/src/file_io.c
@@ -799,6 +799,8 @@ psf_open_handle (PSF_FILE * pfile)
 
 	if (handle == INVALID_HANDLE_VALUE)
 		return NULL;
+
+	return handle;
 #else
 	if (pfile->use_wchar)
 		handle = CreateFileW (
