if (pi == NULL)
if ( !(pi && pc_currchar) )
int inrange2 (UOXSOCKET s, P_ITEM pi) // Is item i in visual range for player on socket s{		P_CHAR pc_currchar = currchar[s];	int vr=VISRANGE;	if (pi == NULL) // blackwind Crash fix		return 0;	if (pi->id1==0x40 &&(pi->id2>=0x7C && pi->id2<=0x7F))	// a large house ??		vr=BUILDRANGE;	return inRange(pc_currchar->pos.x,pc_currchar->pos.y,pi->pos.x,pi->pos.y,vr);}