From df638532d8d060feb460797110bce3eb789222e5 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Thu, 18 Aug 2011 06:44:33 +0000 Subject: [PATCH] image: error reporting in the Android image loading class. --- src/image.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/image.cpp b/src/image.cpp index 63ebee7e..a45ca447 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -134,6 +134,13 @@ Image::Image(char const *path) jstring name = g_env->NewStringUTF(path); data->bmp = g_env->CallObjectMethod(g_ctx, mid, name); g_env->DeleteLocalRef(name); + if (!data->bmp) + { +#if !LOL_RELEASE + Log::Error("could not load %s\n", path); +#endif + exit(1); + } g_env->NewGlobalRef(data->bmp); /* Get image dimensions */