Browse Source

image: error reporting in the Android image loading class.

legacy
Sam Hocevar sam 13 years ago
parent
commit
df638532d8
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      src/image.cpp

+ 7
- 0
src/image.cpp View File

@@ -134,6 +134,13 @@ Image::Image(char const *path)
jstring name = g_env->NewStringUTF(path); jstring name = g_env->NewStringUTF(path);
data->bmp = g_env->CallObjectMethod(g_ctx, mid, name); data->bmp = g_env->CallObjectMethod(g_ctx, mid, name);
g_env->DeleteLocalRef(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); g_env->NewGlobalRef(data->bmp);


/* Get image dimensions */ /* Get image dimensions */


Loading…
Cancel
Save