fixed: Crash when scanning music without any scraper set
authorarnova <arnova@void.org>
Sun, 23 Jun 2013 20:06:57 +0000 (22:06 +0200)
committerarnova <arnova@void.org>
Sun, 23 Jun 2013 20:06:57 +0000 (22:06 +0200)
xbmc/music/infoscanner/MusicInfoScanner.cpp

index 200f2a9..a6a57b8 100644 (file)
@@ -618,7 +618,7 @@ int CMusicInfoScanner::RetrieveMusicInfo(const CStdString& strDirectory, CFileIt
       // No - download the information
       CMusicAlbumInfo albumInfo;
       INFO_RET albumDownloadStatus = INFO_NOT_FOUND;
-      if (m_flags & SCAN_ONLINE)
+      if ((m_flags & SCAN_ONLINE) && albumScraper)
         albumDownloadStatus = DownloadAlbumInfo(*album, albumScraper, albumInfo);
 
       if (albumDownloadStatus == INFO_ADDED || albumDownloadStatus == INFO_HAVE_ALREADY)
@@ -676,7 +676,7 @@ int CMusicInfoScanner::RetrieveMusicInfo(const CStdString& strDirectory, CFileIt
         // No - download the information
         CMusicArtistInfo artistInfo;
         INFO_RET artistDownloadStatus = INFO_NOT_FOUND;
-        if (m_flags & SCAN_ONLINE)
+        if ((m_flags & SCAN_ONLINE) && artistScraper)
           artistDownloadStatus = DownloadArtistInfo(artistTmp, artistScraper, artistInfo);
 
         if (artistDownloadStatus == INFO_ADDED || artistDownloadStatus == INFO_HAVE_ALREADY)
@@ -747,7 +747,7 @@ int CMusicInfoScanner::RetrieveMusicInfo(const CStdString& strDirectory, CFileIt
           // No - download the information
           CMusicArtistInfo artistInfo;
           INFO_RET artistDownloadStatus = INFO_NOT_FOUND;
-          if (m_flags & SCAN_ONLINE)
+          if ((m_flags & SCAN_ONLINE) && artistScraper)
             artistDownloadStatus = DownloadArtistInfo(artistTmp, artistScraper, artistInfo);
 
           if (artistDownloadStatus == INFO_ADDED || artistDownloadStatus == INFO_HAVE_ALREADY)