From: Jim Evins Date: Sun, 24 Jan 2010 15:03:17 +0000 (-0500) Subject: Fixed NULL warning when copying uninitialized barcode objects. X-Git-Tag: glabels-2_3_0~90 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8fe68d63b2acb46a133e9e643d45657faf54ee50;p=glabels Fixed NULL warning when copying uninitialized barcode objects. Make sure both arguments to g_ascii_strcasecmp() are non NULL. --- diff --git a/src/label-barcode.c b/src/label-barcode.c index efc5bc9e..710ceaee 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))