desktop/xfce4-screenshooter: Fix a crash bug (xfce bz #6460)

Thanks to Marc Dix for the heads-up.

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
Robby Workman 2012-02-19 11:45:31 -06:00
parent 0505d75629
commit 4fc8040b01
3 changed files with 39 additions and 2 deletions

View file

@ -0,0 +1,34 @@
From 0dee91880c1cdb78a42ec0f4710c7457442ec34b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Guelfucci?= <jeromeg@xfce.org>
Date: Fri, 21 May 2010 10:14:26 +0200
Subject: [PATCH] Fix a crash when the config file does not exist yet (bug
#6460).
Calling xfce_rc_close on a NULL rc file is not exactly a good idea.
Patch by Thomas (tg42@gmx.de).
---
lib/screenshooter-utils.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/screenshooter-utils.c b/lib/screenshooter-utils.c
index 9615c66..ec84657 100644
--- a/lib/screenshooter-utils.c
+++ b/lib/screenshooter-utils.c
@@ -94,11 +94,11 @@ screenshooter_read_rc_file (const gchar *file, ScreenshotData *sd)
g_free (title);
title =
g_strdup (xfce_rc_read_entry (rc, "title", _("Screenshot")));
- }
- TRACE ("Close the rc file");
+ TRACE ("Close the rc file");
- xfce_rc_close (rc);
+ xfce_rc_close (rc);
+ }
}
/* And set the sd values */
--
1.7.9

View file

@ -24,7 +24,7 @@
PRGNAM=xfce4-screenshooter
VERSION=1.7.9
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
SOUPFORME=${SOUPFORME:-no}
@ -73,9 +73,12 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
# Fix http://bugzilla.xfce.org/show_bug.cgi?id=6460
patch -p1 < $CWD/patches/fix_crash_when_config_is_not_yet_present.diff
if [ "$SOUPFORME" = "no" ]; then
# Strip out the libsoup requirement, which will disable uploads to zimagez
patch -p1 < $CWD/xfce4-screenshooter-1.7.9-no_libsoup.diff
patch -p1 < $CWD/patches/xfce4-screenshooter-1.7.9-no_libsoup.diff
fi
CFLAGS="$SLKCFLAGS" \