From 5cdd920d1267a7548ab492864c4a20a20c3d93ff Mon Sep 17 00:00:00 2001 From: Teruaki Kawashima Date: Sun, 6 Dec 2009 13:52:28 +0000 Subject: Correct checking return value of open in plugins. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23874 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/jewels.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps/plugins/jewels.c') diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index 51ad642c48..586caabfa5 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c @@ -480,6 +480,8 @@ static void jewels_savegame(struct game_context* bj) int fd; /* write out the game state to the save file */ fd = rb->open(SAVE_FILE, O_WRONLY|O_CREAT); + if(fd < 0) return; + rb->write(fd, &bj->tmp_type, sizeof(bj->tmp_type)); rb->write(fd, &bj->type, sizeof(bj->type)); rb->write(fd, &bj->score, sizeof(bj->score)); -- cgit v1.2.3