File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -116,22 +116,22 @@ public class Gala.BackgroundSource : Object {
116116 return background;
117117 }
118118
119- private string get_background_path () {
119+ private string ? get_background_path () {
120120 if (Drawing . StyleManager . get_instance (). prefers_color_scheme == DARK ) {
121121 var uri = gnome_background_settings. get_string (" picture-uri-dark" );
122122 var path = File . new_for_uri (uri). get_path ();
123- if (FileUtils . test (path, EXISTS )) {
123+ if (path != null && FileUtils . test (path, EXISTS )) {
124124 return path;
125125 }
126126 }
127127
128128 var uri = gnome_background_settings. get_string (" picture-uri" );
129129 var path = File . new_for_uri (uri). get_path ();
130- if (FileUtils . test (path, EXISTS )) {
130+ if (path != null && FileUtils . test (path, EXISTS )) {
131131 return path;
132132 }
133133
134- return uri ;
134+ return null ;
135135 }
136136
137137 private void background_changed (Background background ) {
You can’t perform that action at this time.
0 commit comments