Index: platform_tools/android/launcher/skia_launcher.cpp |
diff --git a/platform_tools/android/launcher/skia_launcher.cpp b/platform_tools/android/launcher/skia_launcher.cpp |
index 718a7173da66ab24278efb37ab8e719da5be66c7..746d470a3c2dcaad8d38bc0b1671d75daddc0e62 100644 |
--- a/platform_tools/android/launcher/skia_launcher.cpp |
+++ b/platform_tools/android/launcher/skia_launcher.cpp |
@@ -67,12 +67,16 @@ int main(int argc, const char** argv) { |
return -1; |
} |
+ void* skiaLibrary; |
+ |
+#if defined(SKIA_DLL) |
// load the local skia shared library |
- void* skiaLibrary = load_library(appLocation, "skia_android"); |
+ skiaLibrary = load_library(appLocation, "skia_android"); |
if (NULL == skiaLibrary) |
{ |
return -1; |
} |
+#endif |
// load the appropriate library |
void* appLibrary = load_library(appLocation, argv[1]); |
@@ -80,6 +84,10 @@ int main(int argc, const char** argv) { |
return -1; |
} |
+#if !defined(SKIA_DLL) |
+ skiaLibrary = appLibrary; |
+#endif |
+ |
// find the address of the main function |
int (*app_main)(int, const char**); |
*(void **) (&app_main) = dlsym(appLibrary, "main"); |