Skip to content

Commit

Permalink
add null check after dynamic_cast as suggested by coverity
Browse files Browse the repository at this point in the history
Coverity ID 1343268
  • Loading branch information
dekarl committed Jan 31, 2016
1 parent c09cf8d commit 5778d8a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mythtv/programs/mythfrontend/guidegrid.cpp
Expand Up @@ -914,8 +914,11 @@ bool GuideGrid::gestureEvent(MythGestureEvent *event)
{
MythUIButtonList* channelList = dynamic_cast<MythUIButtonList*>(object);

handled = channelList->gestureEvent(event);
LOG(VB_GENERAL, LOG_INFO, LOC + QString("Guide Gesture Click channel list %1").arg(handled));
if (channelList)
{
handled = channelList->gestureEvent(event);
LOG(VB_GENERAL, LOG_INFO, LOC + QString("Guide Gesture Click channel list %1").arg(handled));
}
}
else if (name.startsWith("guidegrid"))
{
Expand Down

0 comments on commit 5778d8a

Please sign in to comment.