Skip to content

Commit

Permalink
FileScanner: fix Coverity ID 1026724 Dereference before null check
Browse files Browse the repository at this point in the history
Move some code to after the NULL check.
  • Loading branch information
Paul Harrison committed Jun 3, 2013
1 parent dd7527d commit 5817309
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mythplugins/mythmusic/mythmusic/filescanner.cpp
Expand Up @@ -260,9 +260,10 @@ void FileScanner::AddFileToDB(const QString &filename)
LOG(VB_FILE, LOG_INFO,
QString("Reading metadata from %1").arg(filename));
MusicMetadata *data = MetaIO::readMetadata(filename);
data->setFileSize((quint64)QFileInfo(filename).size());
if (data)
{
data->setFileSize((quint64)QFileInfo(filename).size());

QString album_cache_string;

// Set values from cache
Expand Down

0 comments on commit 5817309

Please sign in to comment.