From ef6134ef189aa43e807c856062a6f30a324661d6 Mon Sep 17 00:00:00 2001 From: Amanda Cameron Date: Tue, 15 Sep 2026 06:43:37 -0400 Subject: [PATCH] openos: Fix thread attach logic when not already attached. PR 99 fixes most of the way, but we both forgot the case of no thread being attached yet, this fixes that. --- .../opencomputers/loot_disks/openos/lib/thread.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/data/opencomputers/opencomputers/loot_disks/openos/lib/thread.lua b/src/main/resources/data/opencomputers/opencomputers/loot_disks/openos/lib/thread.lua index d4e69fcaef..54985e8584 100644 --- a/src/main/resources/data/opencomputers/opencomputers/loot_disks/openos/lib/thread.lua +++ b/src/main/resources/data/opencomputers/opencomputers/loot_disks/openos/lib/thread.lua @@ -107,7 +107,7 @@ function box_thread:attach(parent) local proc = process.info(parent) local mt = assert(getmetatable(self), "thread panic: no metadata") if not proc then return nil, "thread failed to attach, process not found" end - if mt.attached.data == proc.data then return self end -- already attached + if mt.attached and mt.attached.data == proc.data then return self end -- already attached -- remove from old parent local waiting_handler