Skip to content

Commit 4510075

Browse files
Copilotbrianrobmconnew
authored
Fix unhandled exception when double-clicking in scroll bar area with no selected nodes (#2254)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: brianrob <[email protected]> Co-authored-by: mconnew <[email protected]> Co-authored-by: Brian Robbins <[email protected]>
1 parent 7e3cf31 commit 4510075

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/PerfView/StackViewer/StackWindow.xaml.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2592,8 +2592,15 @@ private void DoHyperlinkHelp(object sender, ExecutedRoutedEventArgs e)
25922592
private void ByName_MouseDoubleClick(object sender, MouseButtonEventArgs e)
25932593
{
25942594
e.Handled = true;
2595-
DoViewInCallers(sender, null);
2595+
2596+
// Check if a single node is selected before proceeding
2597+
// Exactly one node must be selected in order to view callers.
2598+
if (GetSelectedNodes().Count == 1)
2599+
{
2600+
DoViewInCallers(sender, null);
2601+
}
25962602
}
2603+
25972604
internal void DataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
25982605
{
25992606
var uiElement = sender as UIElement;

0 commit comments

Comments
 (0)