plugins/consoles/win32cons/src/console.cpp
changeset 83 2a78c4ff2eab
parent 30 35cb3fe43f60
--- a/plugins/consoles/win32cons/src/console.cpp	Mon Sep 20 16:46:34 2010 +0100
+++ b/plugins/consoles/win32cons/src/console.cpp	Wed Oct 13 12:41:05 2010 +0100
@@ -25,6 +25,7 @@
 
 CWin32Console::~CWin32Console()
 	{
+	CleanupUnderlyingConsole();
 	iWin32.FreeConsole();
 	// when call FreeConsole(), it should cause the reader thread to exit as the
 	// console read handle will become invalid, and windows will complete the
@@ -61,7 +62,8 @@
 	err = iReaderThread.Create(KReadThreadName, ReaderThread, 0x800, KMinHeapSize, KMinHeapSize*4, &iThreadParams);
 	if (err!=KErrNone) return err;
 	iReaderThread.Resume();	
-	
+	CleanupUnderlyingConsole();
+
 	return KErrNone;
 	}