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

Commit 4a0ded1

Browse files
sevokuTherzok
andcommitted
[Gtk] Code improvements
Co-Authored-By: Marius Ungureanu <[email protected]>
1 parent 9e18300 commit 4a0ded1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Xwt.Gtk/Xwt.GtkBackend/ComboBoxEntryBackend.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public bool Completes
3838
{
3939
get
4040
{
41-
if (Widget?.Model == null)
41+
if (Widget.Model == null)
4242
return completes;
4343
return entryBackend.TextEntry?.Completion?.Model == Widget.Model;
4444
}
@@ -120,6 +120,8 @@ class CustomComboEntryBackend: TextEntryBackend
120120
{
121121
public CustomComboEntryBackend (Gtk.Entry entry)
122122
{
123+
if (entry == null)
124+
throw new ArgumentNullException(nameof(entry));
123125
Widget = entry;
124126
}
125127

@@ -129,4 +131,3 @@ public override void Initialize ()
129131
}
130132
}
131133
}
132-

0 commit comments

Comments
 (0)