Skip to content

Commit 0f81134

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
fix: handle ContextFromObject 2-return-value signature from jni v0.0.5
1 parent a0aa49c commit 0f81134

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

cmd/jniservice/server.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,11 @@ func runServer(cvm *C.JavaVM) {
236236
var appCtx *app.Context
237237
if appContextHandle != 0 {
238238
if ctxObj := handles.Get(appContextHandle); ctxObj != nil {
239-
appCtx = app.ContextFromObject(vm, ctxObj)
239+
var err error
240+
appCtx, err = app.ContextFromObject(vm, ctxObj)
241+
if err != nil {
242+
fmt.Fprintf(os.Stderr, "jniservice: WARNING: ContextFromObject: %v\n", err)
243+
}
240244
}
241245
}
242246

0 commit comments

Comments
 (0)