summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/gme/cgme.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/gme/cgme.c b/plugins/gme/cgme.c
index bc966c14..421680b2 100644
--- a/plugins/gme/cgme.c
+++ b/plugins/gme/cgme.c
@@ -128,6 +128,10 @@ cgme_init (DB_fileinfo_t *_info, DB_playItem_t *it) {
}
if (res) {
DB_FILE *f = deadbeef->fopen (fname);
+ if (!f) {
+ deadbeef->pl_unlock ();
+ return -1;
+ }
int64_t sz = deadbeef->fgetlength (f);
if (sz <= 0) {
deadbeef->fclose (f);