From 9ab2f35c08bde24a690decfa72b8398c83662fa7 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 4 Oct 2024 18:01:51 +0200 Subject: [PATCH] Fix going to a phantom line when there's no source file available. --- profiler/src/profiler/TracySourceView.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profiler/src/profiler/TracySourceView.cpp b/profiler/src/profiler/TracySourceView.cpp index 11f3dbd2..4a16f9fe 100644 --- a/profiler/src/profiler/TracySourceView.cpp +++ b/profiler/src/profiler/TracySourceView.cpp @@ -3950,14 +3950,15 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr SetFont(); if( ImGui::IsItemClicked( 0 ) ) { - m_targetLine = srcline; if( m_source.filename() == fileName ) { + m_targetLine = srcline; SelectLine( srcline, &worker, false ); m_displayMode = DisplayMixed; } else if( SourceFileValid( fileName, worker.GetCaptureTime(), view, worker ) ) { + m_targetLine = srcline; ParseSource( fileName, worker, view ); SelectLine( srcline, &worker, false ); SelectViewMode();