Skip to content
This repository
Browse code

fix: CScraper: check for TiXmlElement NULL return to not pass NULL to…

… StringUtils::EqualsNoCase(), fixes SIGSEGV crash
  • Loading branch information...
commit a20bd74949e812d769cb3b231ecf1bd4a4810bc7 1 parent 898b37e
Daniel Scheller herrnst authored

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. +5 1 xbmc/addons/Scraper.cpp
6 xbmc/addons/Scraper.cpp
@@ -618,7 +618,11 @@ std::vector<CScraperUrl> CScraper::FindMovie(XFILE::CCurlFile &fcurl, const CStd
618 618
619 619 // we need to sort if returned results don't specify 'sorted="yes"'
620 620 if (fSort)
621   - fSort = !StringUtils::EqualsNoCase(xhResults.Element()->Attribute("sorted"), "yes");
  621 + {
  622 + const char *sorted = xhResults.Element()->Attribute("sorted");
  623 + if (sorted != NULL)
  624 + fSort = !StringUtils::EqualsNoCase(sorted, "yes");
  625 + }
622 626
623 627 for (TiXmlElement *pxeMovie = xhResults.FirstChild("entity").Element();
624 628 pxeMovie; pxeMovie = pxeMovie->NextSiblingElement())

0 comments on commit a20bd74

Please sign in to comment.
Something went wrong with that request. Please try again.