Skip to content

Commit

Permalink
Coverity warning: if a cast failed, ConnectBackend() will be called w…
Browse files Browse the repository at this point in the history
…ith a null.

Likelihood of 0.1%, but there was once a compiler bug that did this for events.
  • Loading branch information
NigelPearson committed May 27, 2013
1 parent a142943 commit 4265bb7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mythtv/libs/libmyth/backendselect.cpp
Expand Up @@ -93,9 +93,14 @@ void BackendSelection::Accept(MythUIButtonListItem *item)
DeviceLocation *dev = qVariantValue<DeviceLocation *>(item->GetData());

if (!dev)
{
Cancel();
LOG(VB_GENERAL, LOG_ERR,
"Could not get device details from UI element?");
return;
}

if (ConnectBackend(dev)) // this does a Release()
if (ConnectBackend(dev))
{
if (m_pConfig)
{
Expand Down

0 comments on commit 4265bb7

Please sign in to comment.