summaryrefslogtreecommitdiff
path: root/src/core/miranda.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-01-30 14:56:20 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-01-30 14:56:20 +0000
commitc62ba7b8f551e464e9b217db60a9613baca64f1e (patch)
tree00aa948b9e52e49642a3b9c5c34f7d9911a5211c /src/core/miranda.cpp
parenteb8ce4835cfe80601daaf64b6f842e63b85e62af (diff)
fix to prevent C++ runtime from shutting down Miranda due to wrong data formats etc
git-svn-id: http://svn.miranda-ng.org/main/trunk@3368 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/miranda.cpp')
-rw-r--r--src/core/miranda.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/miranda.cpp b/src/core/miranda.cpp
index 66a3ca8e80..780283b48f 100644
--- a/src/core/miranda.cpp
+++ b/src/core/miranda.cpp
@@ -208,11 +208,20 @@ void CheckRestart()
}
}
+static void crtErrorHandler(const wchar_t*, const wchar_t*, const wchar_t*, unsigned, uintptr_t)
+{
+}
+
int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR cmdLine, int)
{
hInst = hInstance;
hMainThreadId = GetCurrentThreadId();
+ _set_invalid_parameter_handler(&crtErrorHandler);
+ #ifdef _DEBUG
+ _CrtSetReportMode(_CRT_ASSERT, 0);
+ #endif
+
CmdLine_Parse(cmdLine);
setlocale(LC_ALL, "");