Skip to content

Commit e1f9c02

Browse files
author
Robert Henigan
authored
Merge pull request #1648 from smartdevicelink/bugfix/issue_1647
Add NPE check in BaseChoiceSetManager
2 parents 7551226 + 5f448b0 commit e1f9c02

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

base/src/main/java/com/smartdevicelink/managers/screen/choiceset/BaseChoiceSetManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,14 +348,14 @@ private void sendPresentOperation(KeyboardListener keyboardListener, Interaction
348348
ChoiceSetSelectionListener privateChoiceListener = new ChoiceSetSelectionListener() {
349349
@Override
350350
public void onChoiceSelected(ChoiceCell choiceCell, TriggerSource triggerSource, int rowIndex) {
351-
if (pendingPresentationSet.getChoiceSetSelectionListener() != null) {
351+
if (pendingPresentationSet != null && pendingPresentationSet.getChoiceSetSelectionListener() != null) {
352352
pendingPresentationSet.getChoiceSetSelectionListener().onChoiceSelected(choiceCell, triggerSource, rowIndex);
353353
}
354354
}
355355

356356
@Override
357357
public void onError(String error) {
358-
if (pendingPresentationSet.getChoiceSetSelectionListener() != null) {
358+
if (pendingPresentationSet != null && pendingPresentationSet.getChoiceSetSelectionListener() != null) {
359359
pendingPresentationSet.getChoiceSetSelectionListener().onError(error);
360360
}
361361
}

0 commit comments

Comments
 (0)