Skip to content

Commit 316efba

Browse files
committed
pothos-java: init result variable to fix assert
1 parent 2153541 commit 316efba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

JavaHelper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ std::string JavaProxyEnvironment::getClassName(jobject cls)
9494
**********************************************************************/
9595
jvalue JavaProxyEnvironment::CallMethodA(const char retType, jobject obj, jmethodID method, jvalue *args)
9696
{
97-
jvalue result;
97+
jvalue result = {};
9898
switch (retType)
9999
{
100100
case 'L': result.l = env->CallObjectMethodA(obj, method, args); break;
@@ -114,7 +114,7 @@ jvalue JavaProxyEnvironment::CallMethodA(const char retType, jobject obj, jmetho
114114

115115
jvalue JavaProxyEnvironment::CallStaticMethodA(const char retType, jclass cls, jmethodID method, jvalue *args)
116116
{
117-
jvalue result;
117+
jvalue result = {};
118118
switch (retType)
119119
{
120120
case 'L': result.l = env->CallStaticObjectMethodA(cls, method, args); break;

0 commit comments

Comments
 (0)