Index: libadblockplus-android/jni/JniSubscription.cpp |
=================================================================== |
--- a/libadblockplus-android/jni/JniSubscription.cpp |
+++ b/libadblockplus-android/jni/JniSubscription.cpp |
@@ -23,17 +23,19 @@ |
{ |
return JniLongToTypePtr<AdblockPlus::SubscriptionPtr>(ptr)->get(); |
} |
static jlong JNICALL JniCtor(JNIEnv* env, jclass clazz, jlong jsValue) |
{ |
try |
{ |
- return JniPtrToLong(new AdblockPlus::SubscriptionPtr(new AdblockPlus::Subscription(JniGetJsValuePtr(jsValue)))); |
+ AdblockPlus::JsValue *jsValuePtr = JniGetJsValue(jsValue); |
+ return JniPtrToLong(new AdblockPlus::SubscriptionPtr(new AdblockPlus::Subscription( |
+ std::move(*jsValuePtr)))); |
} |
CATCH_THROW_AND_RETURN(env, 0) |
} |
static jboolean JNICALL JniIsListed(JNIEnv* env, jclass clazz, jlong ptr) |
{ |
try |
{ |