From af2fdff577fe537d32274637f9cdea169e2564ce Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 17 Dec 2013 18:52:50 +0000 Subject: [PATCH] android: ensure the asset manager is initialised (hint: it's not). --- src/platform/android/androidapp.cpp | 2 ++ src/sys/file.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/platform/android/androidapp.cpp b/src/platform/android/androidapp.cpp index fb56a266..eeeaae73 100644 --- a/src/platform/android/androidapp.cpp +++ b/src/platform/android/androidapp.cpp @@ -276,6 +276,8 @@ AndroidAppData *g_data; void android_main(android_app* native_app) { + Log::Info("Java layer calling main() for app 0x%08lx", (long)native_app); + g_data = new AndroidAppData(); g_data->m_native_app = native_app; diff --git a/src/sys/file.cpp b/src/sys/file.cpp index 3bc4e407..1fc1b595 100644 --- a/src/sys/file.cpp +++ b/src/sys/file.cpp @@ -63,6 +63,7 @@ class FileData if (err != CELL_FS_SUCCEEDED) m_fd = -1; #elif __ANDROID__ + ASSERT(g_assets); m_asset = AAssetManager_open(g_assets, file.C(), AASSET_MODE_UNKNOWN); #elif HAVE_STDIO_H /* FIXME: no modes, no error checking, no nothing */