Commit 610ee355 authored by gogerald's avatar gogerald Committed by Commit Bot

[Payments] Do not update UI if it is null

This could happen when show has not been called,

Bug: 721362
Change-Id: I1bae92bbf87c9ccc63326d4d1ffd7c798cb4aadc
Reviewed-on: https://chromium-review.googlesource.com/968708Reviewed-by: default avatarRouslan Solomakhin <rouslan@chromium.org>
Commit-Queue: Ganggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544042}
parent debfb4ec
......@@ -1525,7 +1525,10 @@ public class PaymentRequestImpl
mPaymentMethodsSection.addAndSelectOrUpdateItem(updatedAutofillPaymentInstruments);
updateInstrumentModifiedTotals();
mUI.updateSection(PaymentRequestUI.TYPE_PAYMENT_METHODS, mPaymentMethodsSection);
if (mUI != null) {
mUI.updateSection(PaymentRequestUI.TYPE_PAYMENT_METHODS, mPaymentMethodsSection);
}
}
@Override
......@@ -1536,7 +1539,10 @@ public class PaymentRequestImpl
mPaymentMethodsSection.removeAndUnselectItem(guid);
updateInstrumentModifiedTotals();
mUI.updateSection(PaymentRequestUI.TYPE_PAYMENT_METHODS, mPaymentMethodsSection);
if (mUI != null) {
mUI.updateSection(PaymentRequestUI.TYPE_PAYMENT_METHODS, mPaymentMethodsSection);
}
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment