Skip to content

Commit

Permalink
Add more safety when THREAD_GROUP does not exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Oct 30, 2023
1 parent 47c3c1c commit 1317c2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/timeline_trace_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class TimelineTraceFile
#define GRANITE_MACRO_CONCAT_IMPL(a, b) a##b
#define GRANITE_MACRO_CONCAT(a, b) GRANITE_MACRO_CONCAT_IMPL(a, b)
#define GRANITE_SCOPED_TIMELINE_EVENT(str) \
::Util::TimelineTraceFile::ScopedEvent GRANITE_MACRO_CONCAT(_timeline_scoped_count_, __COUNTER__){GRANITE_THREAD_GROUP()->get_timeline_trace_file(), str}
::Util::TimelineTraceFile::ScopedEvent GRANITE_MACRO_CONCAT(_timeline_scoped_count_, __COUNTER__){GRANITE_THREAD_GROUP() ? GRANITE_THREAD_GROUP()->get_timeline_trace_file() : nullptr, str}
#define GRANITE_SCOPED_TIMELINE_EVENT_FILE(file, str) \
::Util::TimelineTraceFile::ScopedEvent GRANITE_MACRO_CONCAT(_timeline_scoped_count_, __COUNTER__){file, str}
#else
Expand Down

0 comments on commit 1317c2e

Please sign in to comment.