summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>2000-08-06 18:09:32 +0000
committerTim Janik <timj@src.gnome.org>2000-08-06 18:09:32 +0000
commit042179dad8ae6eef4053a5c0a2a4843e2d1b9830 (patch)
treef9bf74bb2807c186819c9cf0870ddf6465da55ad /glib
parent37e7118821a81f524931d8a4fa8d7815dd82eb5e (diff)
downloadglib-042179dad8ae6eef4053a5c0a2a4843e2d1b9830.tar.gz
keep *last updated while running through the domain list, so we don't
Sun Aug 6 20:06:02 2000 Tim Janik <timj@gtk.org> * gmessages.c (g_log_domain_check_free): keep *last updated while running through the domain list, so we don't screw up the removal, patch provided by Gady Kozma <gadykozma@hotmail.com>. Sun Aug 6 20:03:41 2000 Tim Janik <timj@gtk.org> * gmessages.c (g_log_remove_handler): keep *last updated while running through the handler list, so we don't screw up the removal.
Diffstat (limited to 'glib')
-rw-r--r--glib/gmessages.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/glib/gmessages.c b/glib/gmessages.c
index 390885f5c..32b63e198 100644
--- a/glib/gmessages.c
+++ b/glib/gmessages.c
@@ -190,7 +190,8 @@ g_log_domain_check_free (GLogDomain *domain)
g_free (domain);
break;
}
- work = work->next;
+ last = work;
+ work = last->next;
}
g_mutex_unlock (g_messages_lock);
}
@@ -328,7 +329,8 @@ g_log_remove_handler (const gchar *log_domain,
g_log_domain_check_free (domain);
return;
}
- work = work->next;
+ last = work;
+ work = last->next;
}
}
g_warning ("g_log_remove_handler(): could not find handler with id `%d' for domain \"%s\"",