diff --git a/platform/win32/ctk/ctk-console.c b/platform/win32/ctk/ctk-console.c
index f4566885d..f16fab263 100644
--- a/platform/win32/ctk/ctk-console.c
+++ b/platform/win32/ctk/ctk-console.c
@@ -30,7 +30,7 @@
*
* Author: Oliver Schmidt
*
- * $Id: ctk-console.c,v 1.3 2006/08/21 22:27:10 oliverschmidt Exp $
+ * $Id: ctk-console.c,v 1.4 2006/09/09 23:20:39 oliverschmidt Exp $
*/
#define WIN32_LEAN_AND_MEAN
@@ -66,13 +66,6 @@ static unsigned short xpos;
static unsigned short ypos;
static unsigned char button;
-/*-----------------------------------------------------------------------------------*/
-static BOOL WINAPI
-consolehandler(DWORD event)
-{
- console_exit();
- exit(EXIT_SUCCESS);
-}
/*-----------------------------------------------------------------------------------*/
void
console_init(void)
@@ -100,7 +93,7 @@ console_init(void)
GetConsoleCursorInfo(stdouthandle, &saved_cursorinfo);
SetConsoleCursorInfo(stdouthandle, &cursorinfo);
- SetConsoleCtrlHandler(consolehandler, TRUE);
+ atexit(console_exit);
memset(blank, ' ', sizeof(blank));
memset(hline, 0xC4, sizeof(hline));