notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
menu: add bios selection
[pcsx_rearmed.git]
/
frontend
/
main.c
diff --git
a/frontend/main.c
b/frontend/main.c
index
52fa349
..
5f8fd5c
100644
(file)
--- a/
frontend/main.c
+++ b/
frontend/main.c
@@
-61,15
+61,16
@@
static void CheckSubDir() {
void set_cd_image(const char *fname)
{
void set_cd_image(const char *fname)
{
- const char *ext;
- int len;
+ const char *ext = NULL;
- len = strlen(fname);
- ext = fname;
- if (len > 2)
- ext = fname + len - 2;
+ if (fname != NULL) {
+ int len = strlen(fname);
+ ext = fname;
+ if (len > 2)
+ ext = fname + len - 2;
+ }
- if (strcasecmp(ext, ".z") == 0) {
+ if (
ext &&
strcasecmp(ext, ".z") == 0) {
SetIsoFile(NULL);
cdrcimg_set_fname(fname);
strcpy(Config.Cdr, "builtin_cdrcimg");
SetIsoFile(NULL);
cdrcimg_set_fname(fname);
strcpy(Config.Cdr, "builtin_cdrcimg");