From f31c61f714012d0026684b1a348c5ca47f362f69 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 16 Oct 2018 11:54:15 +0100 Subject: [PATCH] Don't try to delete from non-existant TLS list --- renderdoc/os/win32/win32_threading.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/renderdoc/os/win32/win32_threading.cpp b/renderdoc/os/win32/win32_threading.cpp index afb3c6e43..be2ef3fca 100644 --- a/renderdoc/os/win32/win32_threading.cpp +++ b/renderdoc/os/win32/win32_threading.cpp @@ -188,8 +188,11 @@ void Init() void Shutdown() { - for(size_t i = 0; i < m_TLSList->size(); i++) - delete m_TLSList->at(i); + if(m_TLSList) + { + for(size_t i = 0; i < m_TLSList->size(); i++) + delete m_TLSList->at(i); + } delete m_TLSList; delete m_TLSListLock;