Skip to content

Commit 3513a19

Browse files
fix crash on missing in frame marker
1 parent 886e946 commit 3513a19

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

gui/Profiler.Controls/FunctionSearch.xaml.cs

+10-5
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ private void Flush()
7575
double maxDuration = 0;
7676
EventFrame maxFrame = null;
7777
Entry maxEntry = null;
78+
EventNode maxNode = null;
7879

7980
foreach (ThreadData thread in Group.Threads)
8081
{
@@ -87,18 +88,22 @@ private void Flush()
8788
{
8889
if (entry.Duration > maxDuration)
8990
{
90-
maxFrame = frame;
91-
maxEntry = entry;
92-
maxDuration = entry.Duration;
91+
EventNode node = frame.Root.FindNode(entry);
92+
if (node != null)
93+
{
94+
maxFrame = frame;
95+
maxEntry = entry;
96+
maxDuration = entry.Duration;
97+
maxNode = node;
98+
}
9399
}
94100
}
95101
}
96102
}
97103
}
98104

99-
if (maxFrame != null && maxEntry != null)
105+
if (maxFrame != null && maxNode != null)
100106
{
101-
EventNode maxNode = maxFrame.Root.FindNode(maxEntry);
102107
RaiseEvent(new FocusFrameEventArgs(GlobalEvents.FocusFrameEvent, new EventFrame(maxFrame, maxNode), null));
103108
}
104109
}

gui/daProfiler/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
// You can specify all the values or you can default the Build and Revision Numbers
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("1.0.10.0")]
55-
[assembly: AssemblyFileVersion("1.0.10.0")]
54+
[assembly: AssemblyVersion("1.0.11.0")]
55+
[assembly: AssemblyFileVersion("1.0.11.0")]

0 commit comments

Comments
 (0)