addons: fix deference before null check (cid #1231840)