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

Commit 80f1629

Browse files
sevokuTherzok
andauthored
[Gtk] Code improvements
Co-Authored-By: Marius Ungureanu <[email protected]>
1 parent 0c47f53 commit 80f1629

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Xwt.Gtk/Xwt.GtkBackend/ComboBoxEntryBackend.cs

+2-3
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,7 +120,7 @@ class CustomComboEntryBackend: TextEntryBackend
120120
{
121121
public CustomComboEntryBackend (Gtk.Entry entry)
122122
{
123-
Widget = entry;
123+
Widget = entry ?? throw new ArgumentNullException (nameof (entry));
124124
}
125125

126126
public override void Initialize ()
@@ -129,4 +129,3 @@ public override void Initialize ()
129129
}
130130
}
131131
}
132-

0 commit comments

Comments
 (0)