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;
|
bml_node *tmp = NULL;
|
||||||
|
|
||||||
tmp = bml_find_sub(c, "name");
|
tmp = bml_find_sub(c, "name");
|
||||||
desc = tmp->data;
|
if (!tmp)
|
||||||
if (!desc)
|
|
||||||
desc = (char *) "";
|
desc = (char *) "";
|
||||||
|
else
|
||||||
|
desc = tmp->data;
|
||||||
|
|
||||||
tmp = bml_find_sub(c, "code");
|
tmp = bml_find_sub(c, "code");
|
||||||
|
if (tmp)
|
||||||
code = tmp->data;
|
code = tmp->data;
|
||||||
|
|
||||||
if (bml_find_sub(c, "enabled"))
|
if (bml_find_sub(c, "enabled"))
|
||||||
|
|
Loading…
Reference in New Issue