Fix null pointers

This commit is contained in:
Manfred Karrer 2017-07-10 12:42:54 +02:00
parent f27f892cd9
commit bda069fd17
2 changed files with 3 additions and 3 deletions

View file

@ -62,7 +62,7 @@ public final class DisputeResult implements NetworkPayload {
private final BooleanProperty tamperProofEvidenceProperty = new SimpleBooleanProperty();
private final BooleanProperty idVerificationProperty = new SimpleBooleanProperty();
private final BooleanProperty screenCastProperty = new SimpleBooleanProperty();
private final StringProperty summaryNotesProperty = new SimpleStringProperty();
private final StringProperty summaryNotesProperty = new SimpleStringProperty("");
private DisputeCommunicationMessage disputeCommunicationMessage;
private byte[] arbitratorSignature;
private long buyerPayoutAmount;

View file

@ -177,8 +177,8 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
// we remove own offers from offerbook when we go offline
// Normally we use a delay for broadcasting to the peers, but at shut down we want to get it fast out
final int size = openOffers.size();
if (offerBookService.isBootstrapped()) {
final int size = openOffers != null ? openOffers.size() : 0;
if (offerBookService.isBootstrapped() && size > 0) {
openOffers.forEach(openOffer -> offerBookService.removeOfferAtShutDown(openOffer.getOffer().getOfferPayload()));
if (completeHandler != null)
UserThread.runAfter(completeHandler::run, size * 200 + 500, TimeUnit.MILLISECONDS);