Skip to content
Browse files

FIX: don't crash on buggy keymap xml

  • Loading branch information...
1 parent b7f0768 commit 5dcabd7282be7a1531e2c5c637d1662477462e80 @koying committed Feb 10, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 xbmc/input/ButtonTranslator.cpp
View
5 xbmc/input/ButtonTranslator.cpp
@@ -566,6 +566,11 @@ bool CButtonTranslator::LoadKeymap(const CStdString &keymapPath)
return false;
}
TiXmlElement* pRoot = xmlDoc.RootElement();
+ if (!pRoot)
+ {
+ CLog::Log(LOGERROR, "Error getiing keymap root: %s", keymapPath.c_str());
+ return false;
+ }
CStdString strValue = pRoot->Value();
if ( strValue != "keymap")
{

0 comments on commit 5dcabd7

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