Skip to content

Commit 70a60b9

Browse files
committed
[Android]fix rtc destroy crash NMS-5434
1 parent ff8e170 commit 70a60b9

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/ProcessRawData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ public void onDestroy() {
137137
engine.leaveChannel();
138138
engine.stopPreview();
139139
}
140-
handler.post(RtcEngine::destroy);
141140
engine = null;
142141
super.onDestroy();
142+
handler.post(RtcEngine::destroy);
143143
}
144144

145145
@Override

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/PushExternalVideo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ public void onDestroy() {
192192
textureBufferHelper = null;
193193
}
194194
}
195-
handler.post(RtcEngine::destroy);
196195
engine = null;
197196
super.onDestroy();
197+
handler.post(RtcEngine::destroy);
198198
}
199199

200200
@Override

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/SwitchCameraScreenShare.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ public void onDestroy() {
182182
engine.leaveChannel();
183183
engine.stopPreview();
184184
}
185-
handler.post(RtcEngine::destroy);
186185
engine = null;
187186
super.onDestroy();
187+
handler.post(RtcEngine::destroy);
188188
}
189189

190190

0 commit comments

Comments
 (0)