diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-03-01 02:57:19 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-03-01 02:57:19 +0000 |
commit | 14d7714988f2f3887fdef04a7e18d701b3ee1912 (patch) | |
tree | 7ffaaa36892bf2c4079b1e008101cf5c68f966b4 /src/main.c | |
parent | 5f21e1e3d051b7a7ed4fcde4201fd2fac2895eed (diff) |
win32: do console initialization only once.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1017 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -270,6 +270,10 @@ static void init_console(void) #ifdef G_OS_WIN32 gint fd; FILE *fp; + static gboolean init_console_done = FALSE; + + if (init_console_done) + return; if (!AllocConsole()) { g_warning("AllocConsole() failed\n"); @@ -286,6 +290,8 @@ static void init_console(void) fp = _fdopen(fd, "w"); *stderr = *fp; setvbuf(stderr, NULL, _IONBF, 0); + + init_console_done = TRUE; #endif } |