Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit 87a4241

Browse files
author
Langston Smith
authored
added null check (#853)
1 parent c695b45 commit 87a4241

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/labs/CalendarIntegrationActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ public void getCalendarData() {
160160
} else {
161161
while (cur.moveToNext()) {
162162
if (index <= 80) {
163-
if (!cur.getString(EVENT_LOCATION_INDEX).isEmpty()) {
163+
if (cur.getString(EVENT_LOCATION_INDEX) != null && !cur.getString(EVENT_LOCATION_INDEX).isEmpty()) {
164164
makeMapboxGeocodingRequest(cur.getString(TITLE_INDEX), cur.getString(EVENT_LOCATION_INDEX));
165165
} else {
166-
Timber.d("getCalendarData: location.isEmpty()");
166+
Timber.d("getCalendarData: location is null or empty");
167167
}
168168
index++;
169169
}

0 commit comments

Comments
 (0)