commit 070118155a8b9be86d9482a07b5f9036dbe3bae1
parent c275b903817eeb0bfef0866591c0f52c569ef71d
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date: Fri, 6 May 2011 16:56:44 +0800
Fix crash when the preferences file is not writable
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/spek-preferences.vala b/src/spek-preferences.vala
@@ -49,7 +49,9 @@ namespace Spek {
public void save () {
var output = FileStream.open (file_name, "w+");
- output.puts (key_file.to_data ());
+ if (output != null) {
+ output.puts (key_file.to_data ());
+ }
}
public bool check_update {