diff options
author | therzok <marius.ungureanu@xamarin.com> | 2019-09-11 20:33:20 +0300 |
---|---|---|
committer | therzok <marius.ungureanu@xamarin.com> | 2019-09-11 20:33:20 +0300 |
commit | 3a71bdac263e77f4d2f3f12f31da5b97fbeea021 (patch) | |
tree | 044b2e2a84c1cb825df6761ad27d82f792ef5d1b /main/src/core | |
parent | c9bed149722f16f7333933a96153079ecf56d0dd (diff) |
Add assertion so we don't hit it in the future
Adding a new Window here would be violating some inheritance principles, so try this.
Diffstat (limited to 'main/src/core')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs index af4db31386..842593a939 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs @@ -27,6 +27,7 @@ using System; using System.Collections.Generic; using MonoDevelop.Components.Commands; using System.Runtime.CompilerServices; +using System.Diagnostics; #if MAC using AppKit; @@ -142,6 +143,8 @@ namespace MonoDevelop.Components var control = GetImplicit<Control, Gtk.Widget>(d); if (control == null) { + Debug.Assert (!(d is Gtk.Window)); + control = new Control (d); d.Destroyed += delegate { GC.SuppressFinalize (control); |