diff options
author | Vsevolod Kukol <sevoku@microsoft.com> | 2019-12-18 17:03:12 +0300 |
---|---|---|
committer | Vsevolod Kukol <sevoku@microsoft.com> | 2019-12-18 17:18:13 +0300 |
commit | 4a0ded137165530740721f6ddd3b893358077129 (patch) | |
tree | caeb5e295b65ae32a8e87329e2d8e54b1bc5110d /Xwt.Gtk | |
parent | 9e18300eccb44cb81603e32d668056eb0c6c3cde (diff) |
[Gtk] Code improvements
Co-Authored-By: Marius Ungureanu <marius.ungureanu@xamarin.com>
Diffstat (limited to 'Xwt.Gtk')
-rw-r--r-- | Xwt.Gtk/Xwt.GtkBackend/ComboBoxEntryBackend.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Xwt.Gtk/Xwt.GtkBackend/ComboBoxEntryBackend.cs b/Xwt.Gtk/Xwt.GtkBackend/ComboBoxEntryBackend.cs index 98228a7e..7788c2e7 100644 --- a/Xwt.Gtk/Xwt.GtkBackend/ComboBoxEntryBackend.cs +++ b/Xwt.Gtk/Xwt.GtkBackend/ComboBoxEntryBackend.cs @@ -38,7 +38,7 @@ namespace Xwt.GtkBackend { get { - if (Widget?.Model == null) + if (Widget.Model == null) return completes; return entryBackend.TextEntry?.Completion?.Model == Widget.Model; } @@ -120,6 +120,8 @@ namespace Xwt.GtkBackend { public CustomComboEntryBackend (Gtk.Entry entry) { + if (entry == null) + throw new ArgumentNullException(nameof(entry)); Widget = entry; } @@ -129,4 +131,3 @@ namespace Xwt.GtkBackend } } } - |