ob= OBACT; if (!ob->id.lib) return; Doset account for OBACT being null, this probably exists in other ares too.