]> git.sur5r.net Git - glabels/commitdiff
Fixed NULL warning when copying uninitialized barcode objects.
authorJim Evins <evins@snaught.com>
Sun, 24 Jan 2010 15:03:17 +0000 (10:03 -0500)
committerJim Evins <evins@snaught.com>
Sun, 24 Jan 2010 15:07:19 +0000 (10:07 -0500)
Make sure both arguments to g_ascii_strcasecmp() are non NULL.

src/label-barcode.c

index efc5bc9e0abc4accf09716b7c5bd0ae6a67c1f9a..710ceaeedba9d3dd5dab5d5aee7f2adc1af0e0c9 100644 (file)
@@ -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))