aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-03-01 02:57:19 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-03-01 02:57:19 +0000
commit14d7714988f2f3887fdef04a7e18d701b3ee1912 (patch)
tree7ffaaa36892bf2c4079b1e008101cf5c68f966b4 /src/main.c
parent5f21e1e3d051b7a7ed4fcde4201fd2fac2895eed (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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index a2e6578b..ff62ce31 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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
}