tevent: fix CID 1437974 dereference after null check