mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Fixed a crash with empty path names in theme box definitions.
This commit is contained in:
parent
0f6338045a
commit
ec48c5d3a4
|
@ -332,6 +332,9 @@ Gui* GuiTheme::createElement(pugi::xml_node data, Gui* parent)
|
|||
//expands a file path (./ becomes the directory of this theme file, ~/ becomes $HOME/)
|
||||
std::string GuiTheme::expandPath(std::string path)
|
||||
{
|
||||
if(path.length() == 0)
|
||||
return "";
|
||||
|
||||
if(path[0] == '~')
|
||||
path = getHomePath() + path.substr(1, path.length() - 1);
|
||||
else if(path[0] == '.')
|
||||
|
|
Loading…
Reference in a new issue