Skip to content

Commit bd8a69b

Browse files
committed
fix nullptr
1 parent 8a2a570 commit bd8a69b

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [0.42.2]
5+
6+
### Fixed
7+
- Fixed NullPointerException introduced in 0.42.1
8+
49
## [0.42.1]
510

611
### Fixed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ allprojects {
3131
}
3232

3333
project.ext {
34-
sdkVersion='0.42.1'
34+
sdkVersion='0.42.2'
3535
versionCode=1
3636

3737
compileSdkVersion=30

core/src/main/java/io/snabble/sdk/Project.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,10 @@ public String getText(String key, String defaultValue) {
483483
* payment process.
484484
*/
485485
public void setCheckedInShop(Shop checkedInShop) {
486-
if (this.checkedInShop == null || !this.checkedInShop.getId().equals(checkedInShop.getId())) {
486+
String currentShopId = this.checkedInShop != null ? this.checkedInShop.getId() : "";
487+
String newShopId = checkedInShop != null ? checkedInShop.getId() : "";
488+
489+
if (!currentShopId.equals(newShopId)) {
487490
this.checkedInShop = checkedInShop;
488491
events.updateShop(checkedInShop);
489492
getShoppingCart().updatePrices(false);

0 commit comments

Comments
 (0)