From 070118155a8b9be86d9482a07b5f9036dbe3bae1 Mon Sep 17 00:00:00 2001 From: Alexander Kojevnikov Date: Fri, 6 May 2011 16:56:44 +0800 Subject: [PATCH] Fix crash when the preferences file is not writable --- src/spek-preferences.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/spek-preferences.vala b/src/spek-preferences.vala index 7c49876..e7ac3d8 100644 --- 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 {