[gimp/tito: 37/50] Added a check for write access to preferences file



commit 9380e4ac49b427241651f3a758464bcb1999697d
Author: Srihari Sriraman <srihari c42 in>
Date:   Sat Sep 15 20:14:18 2012 +0530

    Added a check for write access to preferences file

 app/dialogs/tito-dialog.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/app/dialogs/tito-dialog.c b/app/dialogs/tito-dialog.c
index b1329bf..b0cfd81 100644
--- a/app/dialogs/tito-dialog.c
+++ b/app/dialogs/tito-dialog.c
@@ -848,6 +848,13 @@ tito_write_preferences (void)
 {
  FILE *fp;
  fp=fopen(preference_file_path,"w");
+
+ if(fp==NULL)
+  {
+    g_message("Unable to open preferences file to write");
+   return;
+  }
+
  if(fp == NULL)
     return;
  fprintf(fp,"%d %f %f %d %f %d %d %lf", PREF.POSITION,PREF.POSITION_X, PREF.POSITION_Y,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]