+
+Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
+
+ * gc.c: register a new weak link only if the object is non-null
+ (fixes bug#75061).
+
2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
* culture-info.h : short time pattern too.
slot = slot * 32 + i;
handles->entries [slot] = obj;
if (handles->type <= HANDLE_WEAK_TRACK) {
- mono_gc_weak_link_add (&(handles->entries [slot]), obj);
+ if (obj)
+ mono_gc_weak_link_add (&(handles->entries [slot]), obj);
}
unlock_handles (handles);
if (slot < handles->size && (handles->bitmap [slot / 32] & (1 << (slot % 32)))) {
if (handles->type <= HANDLE_WEAK_TRACK) {
mono_gc_weak_link_remove (&handles->entries [slot]);
- mono_gc_weak_link_add (&handles->entries [slot], obj);
+ if (obj)
+ mono_gc_weak_link_add (&handles->entries [slot], obj);
} else {
handles->entries [slot] = obj;
}