Skip to content

Commit 35e46fa

Browse files
committed
Merge pull request #98 from NativeScript/plamen5kov/bug_fix
fixed error handling bug
2 parents a6ee7ea + 895f53e commit 35e46fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jni/ExceptionUtil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ void ExceptionUtil::ThrowExceptionToJava(TryCatch& tc, const string& prependMess
265265
if (tc.CanContinue())
266266
{
267267
jweak javaThrowable = nullptr;
268-
if (ex->IsObject())
268+
if (!ex.IsEmpty() && ex->IsObject())
269269
{
270270
javaThrowable = TryGetJavaThrowableObject(env, ex->ToObject());
271271
}

0 commit comments

Comments
 (0)