[sodipodi] Don't try to g_snprintf() anchor->href == NULL



commit 20a20c922b79213e7bbfb1269557dc09ae40f619
Author: Hans Breuer <hans breuer org>
Date:   Sat Apr 18 13:25:01 2009 +0200

    Don't try to g_snprintf() anchor->href == NULL
---
 src/sp-anchor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/sp-anchor.c b/src/sp-anchor.c
index feab2a7..bcc5e1d 100644
--- a/src/sp-anchor.c
+++ b/src/sp-anchor.c
@@ -193,7 +193,7 @@ sp_anchor_description (SPItem *item)
 
 	anchor = SP_ANCHOR (item);
 
-	g_snprintf (c, 128, _("Link to %s"), anchor->href);
+	g_snprintf (c, 128, _("Link to %s"), anchor->href ? anchor->href : "(null)");
 
 	return g_strdup (c);
 }



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