File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
tlbimp/src/main/java/com4j/tlbimp Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -187,10 +187,12 @@ class SafeArrayUnmarshaller : public Unmarshaller {
187187 }
188188
189189 virtual jarray unmarshal ( JNIEnv* env ) {
190+ if (psa==NULL ) return NULL ;
190191 return XDUCER::toJava (env,psa);
191192 }
192193
193194 virtual ~SafeArrayUnmarshaller () {
195+ if (psa==NULL ) return ;
194196 SafeArrayDestroy (psa);
195197 }
196198};
Original file line number Diff line number Diff line change @@ -65,7 +65,12 @@ protected IType getReturnTypeBinding() throws BindingException {
6565 if (retParam == -1 ) {
6666 return null ;
6767 }
68- IPtrType pt = params [retParam ].getType ().queryInterface (IPtrType .class );
68+ IParam p = params [retParam ];
69+ IType t = p .getType ();
70+ if (t == null ) {
71+ throw new BindingException (Messages .UNSUPPORTED_TYPE .format ());
72+ }
73+ IPtrType pt = t .queryInterface (IPtrType .class );
6974 if (pt == null ) {
7075 throw new BindingException (Messages .RETVAL_MUST_BY_REFERENCE .format ());
7176 }
You can’t perform that action at this time.
0 commit comments