[glabels] Fixed NULL warning when copying uninitialized barcode objects.



commit 8fe68d63b2acb46a133e9e643d45657faf54ee50
Author: Jim Evins <evins snaught com>
Date:   Sun Jan 24 10:03:17 2010 -0500

    Fixed NULL warning when copying uninitialized barcode objects.
    
    Make sure both arguments to g_ascii_strcasecmp() are non NULL.

 src/label-barcode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/label-barcode.c b/src/label-barcode.c
index efc5bc9..710ceae 100644
--- a/src/label-barcode.c
+++ b/src/label-barcode.c
@@ -252,7 +252,7 @@ gl_label_barcode_set_props (glLabelBarcode *lbc,
 	g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc));
 
 	if ( ((lbc->priv->id == NULL) && (id != NULL))
-	     || (g_ascii_strcasecmp (lbc->priv->id, id) != 0)
+	     || ((lbc->priv->id != NULL) && (id != NULL) && (g_ascii_strcasecmp (lbc->priv->id, id) != 0))
 	     || (lbc->priv->text_flag != text_flag)
 	     || (lbc->priv->checksum_flag != checksum_flag)
 	     || (lbc->priv->format_digits != format_digits))



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