From d023bf0f5dedb67caf9229e3ddcbb5a9fea420ce Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Sun, 10 Jun 2012 17:15:47 +0200 Subject: Fix checks on buflib allocated handles (0 is not a valid handle value) Change-Id: I8fdc5a59a5062f40a431cd49971390e21631b8ec --- apps/gui/icon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/gui/icon.c') 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; -- cgit v1.1