diff --git a/src/mkobj.c b/src/mkobj.c index ad2991ae0..780b84dee 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -14,6 +14,7 @@ STATIC_DCL void FDECL(check_contained, (struct obj *,const char *)); #endif extern struct obj *thrownobj; /* defined in dothrow.c */ +extern struct obj *kickobj; /* dokick.c */ /*#define DEBUG_EFFECTS*/ /* show some messages for debugging */ @@ -1799,7 +1800,8 @@ dealloc_obj(obj) if (obj_sheds_light(obj)) del_light_source(LS_OBJECT, obj_to_any(obj)); - if (obj == thrownobj) thrownobj = (struct obj*)0; + if (obj == thrownobj) thrownobj = 0; + if (obj == kickobj) kickobj = 0; if (obj->oextra) dealloc_oextra(obj->oextra); free((genericptr_t) obj); diff --git a/src/shk.c b/src/shk.c index 238e108b0..12bb53614 100644 --- a/src/shk.c +++ b/src/shk.c @@ -857,8 +857,6 @@ register struct obj *obj, *merge; can't call remove_worn_item() to get _off() side-effects */ setnotworn(obj); } - if (obj == thrownobj) thrownobj = 0; - if (obj == kickobj) kickobj = 0; dealloc_obj(obj); }