From ac12b8e58d25b2b732eccaeea72abf7a82889746 Mon Sep 17 00:00:00 2001 From: Alain Date: Fri, 18 Oct 2024 16:26:14 -0500 Subject: [PATCH] check schema --- src/Widgets/MainView.vala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Widgets/MainView.vala b/src/Widgets/MainView.vala index f806698..dbca1ac 100644 --- a/src/Widgets/MainView.vala +++ b/src/Widgets/MainView.vala @@ -38,8 +38,11 @@ public class Widgets.MainView : Gtk.Widget { }; main_widget.set_parent (this); - var settings = new Settings ("io.elementary.settings"); - settings.bind ("sidebar-position", main_widget, "position", DEFAULT); + var sss = SettingsSchemaSource.get_default ().lookup ("io.elementary.settings", true); + if (sss != null && sss.has_key ("sidebar-position")) { + var settings = new Settings ("io.elementary.settings"); + settings.bind ("sidebar-position", main_widget, "position", DEFAULT); + } } ~MainView () {