diff options
author | waker <wakeroid@gmail.com> | 2011-04-26 20:50:38 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-04-26 20:50:38 +0200 |
commit | 9d63b3e8d5466c0c9a775eb0d1f159e2aa575f66 (patch) | |
tree | ad5d5b878882c27af55d598d54ad1fd784ebebb2 /plugins/gme/cgme.c | |
parent | 2cac3e32b038215b9350cc0896f8599a2a54873e (diff) |
gme: fix crash if can't open file
Diffstat (limited to 'plugins/gme/cgme.c')
-rw-r--r-- | plugins/gme/cgme.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/gme/cgme.c b/plugins/gme/cgme.c index 8eb6d8d3..f6753556 100644 --- a/plugins/gme/cgme.c +++ b/plugins/gme/cgme.c @@ -263,6 +263,9 @@ cgme_insert (DB_playItem_t *after, const char *fname) { } else { DB_FILE *f = deadbeef->fopen (fname); + if (!f) { + return NULL; + } int64_t sz = deadbeef->fgetlength (f); if (sz <= 0) { deadbeef->fclose (f); |