Permalink
Browse files

ae-bridge: Do not log stale dlerror messages.

  • Loading branch information...
littleguy77 committed Feb 26, 2015
1 parent 0e3970a commit 6581bc2e5959fe55a0ff6c11265a0548948108c7
Showing with 6 additions and 2 deletions.
  1. +6 −2 jni/ae-bridge/ae_exports.cpp
@@ -122,7 +122,9 @@ extern jint JNI_OnLoad(JavaVM* vm, void* reserved)
extern "C" DECLSPEC void SDLCALL Java_paulscode_android_mupen64plusae_jni_NativeExports_loadLibraries(JNIEnv* env, jclass cls, jstring jlibPath)
{
LOGI("Loading native libraries");
checkLibraryError("Unknown");
// Clear stale error messages
dlerror();
// Get the library path from the java-managed string
const char *libPath = env->GetStringUTFChars(jlibPath, 0);
@@ -169,7 +171,9 @@ extern "C" DECLSPEC void SDLCALL Java_paulscode_android_mupen64plusae_jni_Native
{
// Unload the libraries to ensure that static variables are re-initialized next time
LOGI("Unloading native libraries");
checkLibraryError("Unknown");
// Clear stale error messages
dlerror();
// Nullify function pointers so that they can no longer be used
aeiInit = NULL;

0 comments on commit 6581bc2

Please sign in to comment.