Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit 759cc79

Browse files
committed
[Debugger] When a CellView gets moved to a null Superview, don't UpdateContents()
When the Superview is null, it means that we are being removed from view so it is unnecessary to UpdateContents(). It can also mean we are in the process of being disposed. Either way, don't UpdateContents(). Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1006517/
1 parent d5d6313 commit 759cc79

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectCellViewBase.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public MacObjectValueTreeView TreeView {
6464
public override NSObject ObjectValue {
6565
get { return base.ObjectValue; }
6666
set {
67-
var target = ((MacObjectValueNode)value)?.Target;
67+
var target = ((MacObjectValueNode) value)?.Target;
6868

6969
if (Node != target) {
7070
if (target != null)
@@ -172,7 +172,9 @@ protected void UpdateFont (NSControl control, int sizeDelta = 0)
172172
public override void ViewDidMoveToSuperview ()
173173
{
174174
base.ViewDidMoveToSuperview ();
175-
UpdateContents ();
175+
176+
if (Superview != null)
177+
UpdateContents ();
176178
}
177179

178180
public override NSBackgroundStyle BackgroundStyle {

0 commit comments

Comments
 (0)