Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/metacling/src/TCling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5484,7 +5484,7 @@ Longptr_t TCling::ExecuteMacro(const char* filename, EErrorCode* error)
const char* TCling::GetTopLevelMacroName() const
{
Warning("GetTopLevelMacroName", "Must change return type!");
return fCurExecutingMacros.back();
return fCurExecutingMacros.empty() ? nullptr : fCurExecutingMacros.back();
}

////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -5535,7 +5535,7 @@ const char* TCling::GetCurrentMacroName() const
Warning("GetCurrentMacroName", "Must change return type!");
#endif
#endif
return fCurExecutingMacros.back();
return fCurExecutingMacros.empty() ? nullptr : fCurExecutingMacros.back();
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
Loading