Fixed SetTimer for hwnd == 0.

diff --git a/windows/timer.c b/windows/timer.c
index 030da66..23209f2 100644
--- a/windows/timer.c
+++ b/windows/timer.c
@@ -104,7 +104,7 @@
     TIMER * pTimer;
     HWINDOWPROC winproc = 0;
 
-    if (GetWindowThreadProcessId( hwnd, NULL ) != GetCurrentThreadId())
+    if (hwnd && GetWindowThreadProcessId( hwnd, NULL ) != GetCurrentThreadId())
     {
         SetLastError( ERROR_INVALID_WINDOW_HANDLE );
         return 0;