Skip to content

Commit

Permalink
tidy: Don't need to check pointer validity.
Browse files Browse the repository at this point in the history
The clang-tidy "clang-analyzer-core.CallAndMessage" check pointed out
that it thought the m_frameTimer->stop function could be called when
m_frameTimer was null.  Looking at the code, m_frameTimer is created
in the parent constructor, has the deleteLater function called on it
in the parent destructor, and no other reference is protected by a
nullptr check.  It seems that the nullptr check is superfluous, not
that the function can be called through a nullptr.
  • Loading branch information
linuxdude42 committed Mar 26, 2019
1 parent 342fab6 commit b4021b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mythplugins/mythzoneminder/mythzoneminder/zmplayer.cpp
Expand Up @@ -126,8 +126,7 @@ bool ZMPlayer::Create(void)

void ZMPlayer::getEventInfo()
{
if (m_frameTimer)
m_frameTimer->stop();
m_frameTimer->stop();

if (*m_currentEvent == -1)
{
Expand Down

0 comments on commit b4021b6

Please sign in to comment.