Fix crash on opening activity details for some devices

This commit is contained in:
José Rebelo 2024-09-20 14:04:18 +01:00
parent af17e55c11
commit 00f8d2259f

View File

@ -768,7 +768,7 @@ public class ActivitySummaryDetail extends AbstractGBActivity {
} }
} }
final String summaryData = currentItem.getSummaryData(); final String summaryData = currentItem.getSummaryData();
if (summaryData.contains(INTERNAL_HAS_GPS)) { if (summaryData != null && summaryData.contains(INTERNAL_HAS_GPS)) {
try { try {
final JSONObject summaryDataObject = new JSONObject(summaryData); final JSONObject summaryDataObject = new JSONObject(summaryData);
final JSONObject internalHasGps = summaryDataObject.getJSONObject(INTERNAL_HAS_GPS); final JSONObject internalHasGps = summaryDataObject.getJSONObject(INTERNAL_HAS_GPS);