[dconf-editor] GtkBin get_child() is nullable.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] GtkBin get_child() is nullable.
- Date: Thu, 7 Dec 2017 22:48:22 +0000 (UTC)
commit 6767e251ab843c424ad3541c9ccdcc698942a23c
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Dec 7 23:47:40 2017 +0100
GtkBin get_child() is nullable.
editor/registry-search.vala | 8 ++++----
editor/registry-view.vala | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/editor/registry-search.vala b/editor/registry-search.vala
index 3a4ef19..cc12b88 100644
--- a/editor/registry-search.vala
+++ b/editor/registry-search.vala
@@ -34,10 +34,10 @@ class RegistrySearch : Grid, PathElement, BrowsableView
set
{
_small_keys_list_rows = value;
- key_list_box.foreach((row) => {
- Widget row_child = ((ListBoxRow) row).get_child ();
- if (row_child is KeyListBoxRow)
- ((KeyListBoxRow) row_child).small_keys_list_rows = value;
+ key_list_box.foreach ((row) => {
+ Widget? row_child = ((ListBoxRow) row).get_child ();
+ if (row_child != null && (!) row_child is KeyListBoxRow)
+ ((KeyListBoxRow) (!) row_child).small_keys_list_rows = value;
});
}
}
diff --git a/editor/registry-view.vala b/editor/registry-view.vala
index 4c0bee9..29d96bf 100644
--- a/editor/registry-view.vala
+++ b/editor/registry-view.vala
@@ -38,9 +38,9 @@ class RegistryView : Grid, PathElement, BrowsableView
{
_small_keys_list_rows = value;
key_list_box.foreach((row) => {
- Widget row_child = ((ListBoxRow) row).get_child ();
- if (row_child is KeyListBoxRow)
- ((KeyListBoxRow) row_child).small_keys_list_rows = value;
+ Widget? row_child = ((ListBoxRow) row).get_child ();
+ if (row_child != null && (!) row_child is KeyListBoxRow)
+ ((KeyListBoxRow) (!) row_child).small_keys_list_rows = value;
});
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]