@@ -349,7 +349,7 @@ public Result_NoneNoneZ validate_holder_commitment(HolderCommitmentTransaction h
349349 Reference .reachabilityFence (preimages );
350350 if (ret >= 0 && ret <= 4096 ) { return null ; }
351351 Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ .constr_from_ptr (ret );
352- this .ptrs_to .add (holder_tx );
352+ if ( this != null ) { this .ptrs_to .add (holder_tx ); } ;
353353 return ret_hu_conv ;
354354 }
355355
@@ -386,7 +386,7 @@ public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitmen
386386 Reference .reachabilityFence (preimages );
387387 if (ret >= 0 && ret <= 4096 ) { return null ; }
388388 Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ .constr_from_ptr (ret );
389- this .ptrs_to .add (commitment_tx );
389+ if ( this != null ) { this .ptrs_to .add (commitment_tx ); } ;
390390 return ret_hu_conv ;
391391 }
392392
@@ -425,7 +425,7 @@ public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_holder_commitment_and_
425425 Reference .reachabilityFence (commitment_tx );
426426 if (ret >= 0 && ret <= 4096 ) { return null ; }
427427 Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ .constr_from_ptr (ret );
428- this .ptrs_to .add (commitment_tx );
428+ if ( this != null ) { this .ptrs_to .add (commitment_tx ); } ;
429429 return ret_hu_conv ;
430430 }
431431
@@ -486,7 +486,7 @@ public Result_SignatureNoneZ sign_justice_revoked_htlc(byte[] justice_tx, long i
486486 Reference .reachabilityFence (htlc );
487487 if (ret >= 0 && ret <= 4096 ) { return null ; }
488488 Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ .constr_from_ptr (ret );
489- this .ptrs_to .add (htlc );
489+ if ( this != null ) { this .ptrs_to .add (htlc ); } ;
490490 return ret_hu_conv ;
491491 }
492492
@@ -519,7 +519,7 @@ public Result_SignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx,
519519 Reference .reachabilityFence (htlc );
520520 if (ret >= 0 && ret <= 4096 ) { return null ; }
521521 Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ .constr_from_ptr (ret );
522- this .ptrs_to .add (htlc );
522+ if ( this != null ) { this .ptrs_to .add (htlc ); } ;
523523 return ret_hu_conv ;
524524 }
525525
@@ -535,7 +535,7 @@ public Result_SignatureNoneZ sign_closing_transaction(ClosingTransaction closing
535535 Reference .reachabilityFence (closing_tx );
536536 if (ret >= 0 && ret <= 4096 ) { return null ; }
537537 Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ .constr_from_ptr (ret );
538- this .ptrs_to .add (closing_tx );
538+ if ( this != null ) { this .ptrs_to .add (closing_tx ); } ;
539539 return ret_hu_conv ;
540540 }
541541
@@ -556,7 +556,7 @@ public Result_C2Tuple_SignatureSignatureZNoneZ sign_channel_announcement(Unsigne
556556 Reference .reachabilityFence (msg );
557557 if (ret >= 0 && ret <= 4096 ) { return null ; }
558558 Result_C2Tuple_SignatureSignatureZNoneZ ret_hu_conv = Result_C2Tuple_SignatureSignatureZNoneZ .constr_from_ptr (ret );
559- this .ptrs_to .add (msg );
559+ if ( this != null ) { this .ptrs_to .add (msg ); } ;
560560 return ret_hu_conv ;
561561 }
562562
@@ -576,7 +576,7 @@ public void ready_channel(ChannelTransactionParameters channel_parameters) {
576576 bindings .BaseSign_ready_channel (this .ptr , channel_parameters == null ? 0 : channel_parameters .ptr );
577577 Reference .reachabilityFence (this );
578578 Reference .reachabilityFence (channel_parameters );
579- this .ptrs_to .add (channel_parameters );
579+ if ( this != null ) { this .ptrs_to .add (channel_parameters ); } ;
580580 }
581581
582582 /**
@@ -588,7 +588,7 @@ public ChannelPublicKeys get_pubkeys() {
588588 Reference .reachabilityFence (this );
589589 if (ret >= 0 && ret <= 4096 ) { return null ; }
590590 org .ldk .structs .ChannelPublicKeys ret_hu_conv = null ; if (ret < 0 || ret > 4096 ) { ret_hu_conv = new org .ldk .structs .ChannelPublicKeys (null , ret ); }
591- ret_hu_conv .ptrs_to .add (this );
591+ if ( ret_hu_conv != null ) { ret_hu_conv .ptrs_to .add (this ); } ;
592592 return ret_hu_conv ;
593593 }
594594
0 commit comments