diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java index 84b1c94fd7..7b1a3ca9d1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java @@ -4964,6 +4964,7 @@ public T syncCall(SwtCallable callable) throws E * @exception SWTException * * @see #asyncExec @@ -5005,10 +5006,9 @@ public void timerExec (int milliseconds, Runnable runnable) { } } long newTimerID = OS.SetTimer (hwndMessage, timerId, milliseconds, 0); - if (newTimerID != 0) { - timerList [index] = runnable; - timerIds [index] = newTimerID; - } + if (newTimerID == 0) SWT.error (SWT.ERROR_NO_HANDLES); + timerList [index] = runnable; + timerIds [index] = newTimerID; } boolean translateAccelerator (MSG msg, Control control) {