Skip to content

Commit 9203f3c

Browse files
committed
Don't crash if mTermSessions == null while handling result from WindowListActivity
Not 100% sure how this happens in the first place, but this should at least prevent the crash in #142.
1 parent 095e934 commit 9203f3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jackpal/androidterm/Term.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ protected void onActivityResult(int request, int result, Intent data) {
708708
}
709709
} else {
710710
// Close the activity if user closed all sessions
711-
if (mTermSessions.size() == 0) {
711+
if (mTermSessions == null || mTermSessions.size() == 0) {
712712
mStopServiceOnFinish = true;
713713
finish();
714714
}

0 commit comments

Comments
 (0)