Skip to content

Commit c47b46e

Browse files
committed
Fix nil pointer issue
1 parent eb20e12 commit c47b46e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/uber/cadence/internal/common/WorkflowExecutionUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private static HistoryEvent getInstanceCloseEvent(
226226

227227
pageToken = response.getNextPageToken();
228228
History history = response.getHistory();
229-
if (history != null && history.getEvents().size() > 0) {
229+
if (history != null && history.getEvents() != null && history.getEvents().size() > 0) {
230230
event = history.getEvents().get(0);
231231
if (!isWorkflowExecutionCompletedEvent(event)) {
232232
throw new RuntimeException("Last history event is not completion event: " + event);

0 commit comments

Comments
 (0)