tevent: fix CID 1437976 dereference before null check