This change is applicable to loading the wallet-core on Android using the library directly instead of JNI.
Without calling JNI_OnLoad the jvm pointer is NULL, so any attempt to use it in random_buffer will result in a nullptr dereference.
In addition to preventing the crash, the Unix compatible implementation was used as an alternative when using the library directly.
This change is applicable to loading the wallet-core on Android using the library directly instead of JNI. Without calling JNI_OnLoad the jvm pointer is NULL, so any attempt to use it in random_buffer will result in a nullptr dereference.
In addition to preventing the crash, the Unix compatible implementation was used as an alternative when using the library directly.