のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

server is null in send_object_added

Native

     97 android_mtp_MtpServer_send_object_added(JNIEnv *env, jobject thiz, jint handle)
     98 {
     99     Mutex::Autolock autoLock(sMutex);
    100 
    101     MtpServer* server = getMtpServer(env, thiz);
    102     if (server)
    103         server->sendObjectAdded(handle);
    104     else
    105         ALOGE("server is null in send_object_added");
    106 }
    107 

ライブラリがなくなったとかなのかな?

     55 static inline MtpServer* getMtpServer(JNIEnv *env, jobject thiz) {
     56     return (MtpServer*)env->GetIntField(thiz, field_MtpServer_nativeContext);
     57 }