merge with Edgar's changes
commit
8d1ef9809c
|
@ -37,7 +37,7 @@ MTS_NAMESPACE_BEGIN
|
||||||
if (EXPECT_NOT_TAKEN(thread == NULL)) \
|
if (EXPECT_NOT_TAKEN(thread == NULL)) \
|
||||||
throw std::runtime_error("Null thread pointer"); \
|
throw std::runtime_error("Null thread pointer"); \
|
||||||
mitsuba::Logger *logger = thread->getLogger(); \
|
mitsuba::Logger *logger = thread->getLogger(); \
|
||||||
if (level >= logger->getLogLevel()) \
|
if (logger != NULL && level >= logger->getLogLevel()) \
|
||||||
logger->log(level, m_theClass, \
|
logger->log(level, m_theClass, \
|
||||||
__FILE__, __LINE__, fmt, ## __VA_ARGS__); \
|
__FILE__, __LINE__, fmt, ## __VA_ARGS__); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
@ -51,7 +51,7 @@ MTS_NAMESPACE_BEGIN
|
||||||
if (EXPECT_NOT_TAKEN(thread == NULL)) \
|
if (EXPECT_NOT_TAKEN(thread == NULL)) \
|
||||||
throw std::runtime_error("Null thread pointer"); \
|
throw std::runtime_error("Null thread pointer"); \
|
||||||
mitsuba::Logger *logger = thread->getLogger(); \
|
mitsuba::Logger *logger = thread->getLogger(); \
|
||||||
if (level >= logger->getLogLevel()) \
|
if (logger != NULL && level >= logger->getLogLevel()) \
|
||||||
logger->log(level, NULL, \
|
logger->log(level, NULL, \
|
||||||
__FILE__, __LINE__, fmt, ## __VA_ARGS__); \
|
__FILE__, __LINE__, fmt, ## __VA_ARGS__); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
|
@ -446,10 +446,9 @@ void Thread::staticShutdown() {
|
||||||
__unmanagedThreads[i]->decRef();
|
__unmanagedThreads[i]->decRef();
|
||||||
__unmanagedThreads.clear();
|
__unmanagedThreads.clear();
|
||||||
getThread()->d->running = false;
|
getThread()->d->running = false;
|
||||||
ThreadPrivate::self->set(NULL);
|
detail::destroyLocalTLS();
|
||||||
delete ThreadPrivate::self;
|
delete ThreadPrivate::self;
|
||||||
ThreadPrivate::self = NULL;
|
ThreadPrivate::self = NULL;
|
||||||
detail::destroyLocalTLS();
|
|
||||||
detail::destroyGlobalTLS();
|
detail::destroyGlobalTLS();
|
||||||
#if defined(__OSX__)
|
#if defined(__OSX__)
|
||||||
__mts_autorelease_shutdown();
|
__mts_autorelease_shutdown();
|
||||||
|
|
Loading…
Reference in New Issue