diff --git a/source/shared_lib/sources/platform/sdl/thread.cpp b/source/shared_lib/sources/platform/sdl/thread.cpp index 2871a341..764c28c4 100644 --- a/source/shared_lib/sources/platform/sdl/thread.cpp +++ b/source/shared_lib/sources/platform/sdl/thread.cpp @@ -11,9 +11,12 @@ #include #include #include +#include #include "noimpl.h" +using namespace std; + namespace Shared{ namespace Platform{ // ===================================== @@ -39,6 +42,10 @@ void Thread::setPriority(Thread::Priority threadPriority) { int Thread::beginExecution(void* data) { Thread* thread = static_cast (data); + assert(thread != NULL); + if(thread == NULL) { + throw runtime_error("thread == NULL"); + } thread->execute(); return 0; }