[Xfce4-commits] [apps/xfce4-screenshooter] 01/02: Simplify

noreply at xfce.org noreply at xfce.org
Sun Jan 13 17:29:59 CET 2019


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screenshooter.

commit a41d999d07d729dd8549cd8f77100657d4790793
Author: Andre Miranda <andreldm at xfce.org>
Date:   Sun Jan 13 12:35:37 2019 -0300

    Simplify
---
 lib/screenshooter-dialogs.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/lib/screenshooter-dialogs.c b/lib/screenshooter-dialogs.c
index 41aef94..8f735cc 100644
--- a/lib/screenshooter-dialogs.c
+++ b/lib/screenshooter-dialogs.c
@@ -1176,17 +1176,14 @@ gchar
 *screenshooter_save_screenshot_to (GdkPixbuf   *screenshot,
                                    const gchar *save_uri)
 {
-  GFile *save_file = g_file_new_for_uri (save_uri);
+  GFile *save_file = NULL;
   gchar *result = NULL;
 
-  if (save_uri == NULL)
-    {
-      g_object_unref (save_file);
-      return NULL;
-    }
+  g_return_val_if_fail (save_uri != NULL, NULL);
 
-  /* If the URI is a local one, we save directly */
+  save_file = g_file_new_for_uri (save_uri);
 
+  /* If the URI is a local one, we save directly */
   if (!screenshooter_is_remote_uri (save_uri))
     result = save_screenshot_to_local_path (screenshot, save_file);
   else

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list