Permalink
Browse files

[WIN] added handler for access violation during thread startup

exceptions were caught but reported as unhandled and without details.
  • Loading branch information...
1 parent a642a6e commit 4bd0b22ccf2d99116e6bd98fdedc502e9c5d75ac @CrystalP CrystalP committed with Apr 15, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 xbmc/threads/Thread.cpp
View
@@ -148,6 +148,16 @@ DWORD WINAPI CThread::staticThread(LPVOID* data)
pThread->OnStartup();
}
#ifndef _LINUX
+ catch (const access_violation &e)
+ {
+ e.writelog(__FUNCTION__);
+ if( pThread->IsAutoDelete() )
+ {
+ delete pThread;
+ _endthreadex(123);
+ return 0;
+ }
+ }
catch (const win32_exception &e)
{
e.writelog(__FUNCTION__);

0 comments on commit 4bd0b22

Please sign in to comment.