Skip to content

Commit 44d61f6

Browse files
committed
Support for mutexes prior to tool initialization.
1 parent e124945 commit 44d61f6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/opdi/logic/omp/mutexOmpLogic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ void opdi::MutexOmpLogic::internalOnMutexAcquired(MutexKind kind, MutexTrace& mu
239239
void (*decrementReverseFunc)(void*),
240240
std::size_t waitId) {
241241

242-
if (tool->getThreadLocalTape() != nullptr && tool->isActive(tool->getThreadLocalTape())) {
242+
if (tool != nullptr && tool->getThreadLocalTape() != nullptr && tool->isActive(tool->getThreadLocalTape())) {
243243

244244
// skip inactive mutexes
245245
if (mutexTrace.inactive.count(waitId) == 0) {
@@ -311,7 +311,7 @@ void opdi::MutexOmpLogic::internalOnMutexReleased(MutexKind kind, MutexTrace& mu
311311
std::map<std::size_t, std::size_t>& localTrace,
312312
void (*waitReverseFunc)(void*), std::size_t waitId) {
313313

314-
if (tool->getThreadLocalTape() != nullptr && tool->isActive(tool->getThreadLocalTape())) {
314+
if (tool != nullptr && tool->getThreadLocalTape() != nullptr && tool->isActive(tool->getThreadLocalTape())) {
315315

316316
// skip inactive mutexes
317317
if (mutexTrace.inactive.count(waitId) == 0) {

0 commit comments

Comments
 (0)