[gnome-flashback] screenshot: fix critical warning if special dir does not exist



commit bcb413ffae3664405463528fa2d8756ca88e9f98
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sat Oct 26 12:22:07 2019 +0300

    screenshot: fix critical warning if special dir does not exist

 gnome-flashback/libscreenshot/gf-screenshot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnome-flashback/libscreenshot/gf-screenshot.c b/gnome-flashback/libscreenshot/gf-screenshot.c
index 2f3d644..2d06a9f 100644
--- a/gnome-flashback/libscreenshot/gf-screenshot.c
+++ b/gnome-flashback/libscreenshot/gf-screenshot.c
@@ -300,7 +300,7 @@ get_filename (const gchar *filename)
 
   path = g_get_user_special_dir (G_USER_DIRECTORY_PICTURES);
 
-  if (!g_file_test (path, G_FILE_TEST_EXISTS))
+  if (path == NULL || !g_file_test (path, G_FILE_TEST_EXISTS))
     {
       path = g_get_home_dir ();
 


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