I get a Unhandled Exception when i close down my mfc dialog application.

The assert happens in afxstate.cpp one the fallowing line:

Code:
AFX_MODULE_STATE::~AFX_MODULE_STATE()
{
#ifndef _AFX_NO_DAO_SUPPORT
	delete m_pDaoState;
#endif

	// clean up type lib cache map, if any
	if (m_pTypeLibCacheMap != NULL)
	{
		m_pTypeLibCacheMap->RemoveAll(&m_typeLibCache);
		delete m_pTypeLibCacheMap;
	}
	//Fusion: delete each member of the array and the array itself
#ifndef _AFX_NO_AFXCMN_SUPPORT
---->>>>	delete m_pDllIsolationWrappers[_AFX_COMCTL32_ISOLATION_WRAPPER_INDEX];
#endif
	delete m_pDllIsolationWrappers[_AFX_COMMDLG_ISOLATION_WRAPPER_INDEX];
	delete [] m_pDllIsolationWrappers;
	if (m_hActCtx != NULL && m_hActCtx != INVALID_HANDLE_VALUE)
	{
		AfxReleaseActCtx(m_hActCtx);
		m_hActCtx = INVALID_HANDLE_VALUE;
	}
}
Here is my call stack:

App_win32_debug.exe!AFX_MODULE_STATE::~AFX_MODULE_STATE() Line 317 + 0x3 bytes C++
App_win32_debug.exe!_AFX_BASE_MODULE_STATE::`scalar deleting destructor'() + 0x8 bytes C++
App_win32_debug.exe!CProcessLocalObject::~CProcessLocalObject() Line 478 C++
App_win32_debug.exe!doexit(int code=2, int quick=0, int retcaller=0) Line 553 C
App_win32_debug.exe!exit(int code=2) Line 398 + 0xd bytes C
App_win32_debug.exe!__tmainCRTStartup() Line 324 C
App_win32_debug.exe!WinMainCRTStartup() Line 187 C


Anyone have any ideas on this?