[BUG] ChatProcessor: GetChild(0) throws if container is empty #4

Closed
opened 2026-03-12 00:02:29 +00:00 by lavarius · 0 comments
Owner

🔴 Critical Bug

File: ChatProcessor.cs

chatMessagesContainer.transform.GetChild(0) throws ArgumentException if the container has no children, which can happen on first load or after clearing messages.

Fix: Add a guard:

if (chatMessagesContainer.transform.childCount > 0)
{
    // safe to call GetChild(0)
}
## 🔴 Critical Bug **File:** `ChatProcessor.cs` `chatMessagesContainer.transform.GetChild(0)` throws `ArgumentException` if the container has no children, which can happen on first load or after clearing messages. **Fix:** Add a guard: ```csharp if (chatMessagesContainer.transform.childCount > 0) { // safe to call GetChild(0) } ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lavarius/ProjectOverlay#4
No description provided.