android: Of course you can't put null in a LinkedBlockingQueue. Shrug. Fixes a shutdown crash.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 43m31s

This commit is contained in:
2025-09-02 20:57:05 -04:00
parent 91fd515d39
commit f4c928f26e

View File

@@ -63,6 +63,7 @@ public class TildeFriendsActivity extends Activity {
private float touch_down_y;
private boolean ready = false;
private boolean loaded = false;
private boolean shutting_down = false;
static {
log("Calling system.loadLibrary().");
@@ -274,7 +275,7 @@ public class TildeFriendsActivity extends Activity {
log_thread = new Thread(new Runnable() {
@Override
public void run() {
while (true) {
while (!s_activity.shutting_down) {
try {
String message = log_queue.take();
if (message != null) {
@@ -335,8 +336,9 @@ public class TildeFriendsActivity extends Activity {
protected void onDestroy()
{
try {
shutting_down = true;
if (log_queue != null) {
log_queue.put(null);
log_queue.put("Goodbye.");
}
log_thread.join();
} catch (InterruptedException e) {