[gnome-screenshot] Ignore NULL save_dir



commit 414da9c78d5d3f2e307bd1b3f98a86a9956e428a
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jun 28 12:12:46 2012 +0100

    Ignore NULL save_dir
    
    https://bugzilla.gnome.org/show_bug.cgi?id=679056

 src/screenshot-filename-builder.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/screenshot-filename-builder.c b/src/screenshot-filename-builder.c
index 94143f9..6f57bf1 100644
--- a/src/screenshot-filename-builder.c
+++ b/src/screenshot-filename-builder.c
@@ -98,6 +98,9 @@ sanitize_save_directory (const gchar *save_dir)
 {
   gchar *retval = g_strdup (save_dir);
 
+  if (save_dir == NULL)
+    return NULL;
+
   if (save_dir[0] == '~')
     {
       char *tmp = expand_initial_tilde (save_dir);



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