From c54bf40ef96806bf836db205f79e60d016b7eee9 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Fri, 22 Sep 2017 17:16:47 +0100 Subject: cWorld Threads: Seperate initialization and thread start. Prevents nullptr dereferences before Start has been called. --- src/LightingThread.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/LightingThread.h') diff --git a/src/LightingThread.h b/src/LightingThread.h index 0208848f6..6c27ff7ba 100644 --- a/src/LightingThread.h +++ b/src/LightingThread.h @@ -52,11 +52,9 @@ class cLightingThread : public: - cLightingThread(void); + cLightingThread(cWorld & a_World); virtual ~cLightingThread() override; - bool Start(cWorld * a_World); - void Stop(void); /** Queues the entire chunk for lighting. @@ -94,7 +92,7 @@ protected: typedef std::list cChunkStays; - cWorld * m_World; + cWorld & m_World; /** The mutex to protect m_Queue and m_PendingQueue */ cCriticalSection m_CS; -- cgit v1.2.3