Don't report an error if no event registered
(cherry picked from commit 4669637db8956b72f6078eb0b9858cf76d1ca222)