Skip to content

Commit

Permalink
fix bug with debug info crash for dynamic startup sections
Browse files Browse the repository at this point in the history
  • Loading branch information
LADSoft committed Aug 3, 2024
1 parent 21d75ed commit 6aeb047
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/olink/LinkDebugFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,10 +754,10 @@ bool LinkDebugFile::WriteAutosTable()
case ObjDebugTag::eVirtualFunctionEnd:
case ObjDebugTag::eBlockEnd:
case ObjDebugTag::eFunctionEnd: {

int end = currentLine->GetLineNumber();
// currentLine could be null for example for the dynamic sections that aren't related to normal code gen...
int end = currentLine ? currentLine->GetLineNumber() : 0;
// this next line is a safety, used to use start line
int fileId = currentLine->GetFile()->GetIndex();
int fileId = currentLine ? currentLine->GetFile()->GetIndex() : 0;
for (auto obj : currentContext->vars)
{
ObjSymbol* s = obj.first;
Expand Down

0 comments on commit 6aeb047

Please sign in to comment.