mirror of https://github.com/snes9xgit/snes9x.git
Fix crash when elements are missing.
This commit is contained in:
parent
13769eeccf
commit
dbf9bd6616
|
@ -743,11 +743,13 @@ static void S9xLoadCheatsFromBMLNode (bml_node *n)
|
|||
bml_node *tmp = NULL;
|
||||
|
||||
tmp = bml_find_sub(c, "name");
|
||||
desc = tmp->data;
|
||||
if (!desc)
|
||||
if (!tmp)
|
||||
desc = (char *) "";
|
||||
else
|
||||
desc = tmp->data;
|
||||
|
||||
tmp = bml_find_sub(c, "code");
|
||||
if (tmp)
|
||||
code = tmp->data;
|
||||
|
||||
if (bml_find_sub(c, "enabled"))
|
||||
|
|
Loading…
Reference in New Issue