src/Settings.vala
authorAlan <alan@roojs.com>
Thu, 8 Feb 2024 08:31:28 +0000 (16:31 +0800)
committerAlan <alan@roojs.com>
Thu, 8 Feb 2024 08:31:28 +0000 (16:31 +0800)
src/Settings.vala

index 0900a19..2b7e121 100644 (file)
@@ -24,7 +24,9 @@ public class Settings : Object  {
                }
                set {
                        this._editor_font_size = value;
-                       this.css.load_from_string(" .code-editor{ font-size: %spx; }".printf(value);
+                       if (this.css != nul) {
+                               this.css.load_from_string(" .code-editor{ font-size: %spx; }".printf(value);
+                       }
                        this.save();
                }