diff options
| author | Bertrik Sikken <bertrik@sikken.nl> | 2012-06-10 17:15:47 +0200 |
|---|---|---|
| committer | Bertrik Sikken <bertrik@sikken.nl> | 2012-06-10 17:15:47 +0200 |
| commit | d023bf0f5dedb67caf9229e3ddcbb5a9fea420ce (patch) | |
| tree | 3562a23f7eb6009e161cbc8aae943de33d168b91 /apps/gui/icon.c | |
| parent | 900cf6d52bd806bd54ad2118e245cd3465ea6815 (diff) | |
| download | rockbox-d023bf0f5dedb67caf9229e3ddcbb5a9fea420ce.zip rockbox-d023bf0f5dedb67caf9229e3ddcbb5a9fea420ce.tar.gz rockbox-d023bf0f5dedb67caf9229e3ddcbb5a9fea420ce.tar.bz2 rockbox-d023bf0f5dedb67caf9229e3ddcbb5a9fea420ce.tar.xz | |
Fix checks on buflib allocated handles (0 is not a valid handle value)
Change-Id: I8fdc5a59a5062f40a431cd49971390e21631b8ec
Diffstat (limited to 'apps/gui/icon.c')
| -rw-r--r-- | apps/gui/icon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c index 46da38b..f37cee9 100644 --- a/apps/gui/icon.c +++ b/apps/gui/icon.c @@ -197,7 +197,7 @@ static void load_icons(const char* filename, enum Iconset iconset, size_t buf_size = read_bmp_fd(fd, &ic->bmp, 0, bmpformat|FORMAT_RETURN_SIZE, NULL); ic->handle = core_alloc_ex(filename, buf_size, &buflib_ops); - if (ic->handle < 0) + if (ic->handle <= 0) { close(fd); return; |