+2006-01-05 Jim Evins <evins@snaught.com>
+
+ * src/merge-properties-dialog.c: (src_changed_cb):
+ Be extra paranoid before calling strcmp().
+ * src/merge.c: (gl_merge_set_src):
+ Don't make (merge == NULL) a critical error.
+
2005-12-22 Jim Evins <evins@snaught.com>
* src/glabels-batch.c: (main):
gl_debug (DEBUG_MERGE, "orig=\"%s\", new=\"%s\"\n", orig_src, src);
- if (!orig_src || strcmp (src, orig_src)) {
+ if (((orig_src == NULL) && (src != NULL)) ||
+ ((orig_src != NULL) && (src == NULL)) ||
+ ((orig_src != NULL) && (src != NULL) && strcmp (src, orig_src)))
+ {
gl_merge_set_src (dialog->priv->merge, src);
load_tree (dialog->priv->store, dialog->priv->merge);
}
gl_debug (DEBUG_MERGE, "START");
- g_return_if_fail (merge && GL_IS_MERGE (merge));
+ if (merge == NULL)
+ {
+ gl_debug (DEBUG_MERGE, "END (NULL)");
+ return;
+ }
- if ( src == NULL) {
+ g_return_if_fail (GL_IS_MERGE (merge));
- if ( merge->private->src != NULL ) {
+ if ( src == NULL)
+ {
+
+ if ( merge->private->src != NULL )
+ {
g_free (merge->private->src);
}
merge->private->src = NULL;
merge_free_record_list (&merge->private->record_list);
- } else {
+ }
+ else
+ {
- if ( merge->private->src != NULL ) {
+ if ( merge->private->src != NULL )
+ {
g_free(merge->private->src);
}
merge->private->src = g_strdup (src);
merge_free_record_list (&merge->private->record_list);
merge_open (merge);
- while ( (record = merge_get_record (merge)) != NULL ) {
+ while ( (record = merge_get_record (merge)) != NULL )
+ {
record_list = g_list_append( record_list, record );
}
merge_close (merge);