mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 20:15:17 +00:00
Prevent chat messages on load from crashing
This commit is contained in:
parent
af9b359227
commit
c9ff077ece
1 changed files with 1 additions and 0 deletions
|
@ -60,6 +60,7 @@ void djui_chat_message_create_from(u8 globalIndex, const char* message) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void djui_chat_message_create(const char* message) {
|
void djui_chat_message_create(const char* message) {
|
||||||
|
if (gDjuiChatBox == NULL || gDjuiChatBox->chatFlow == NULL) { return; }
|
||||||
struct DjuiChatMessage* chatMessage = calloc(1, sizeof(struct DjuiChatMessage));
|
struct DjuiChatMessage* chatMessage = calloc(1, sizeof(struct DjuiChatMessage));
|
||||||
struct DjuiBase* base = &chatMessage->base;
|
struct DjuiBase* base = &chatMessage->base;
|
||||||
djui_base_init(&gDjuiChatBox->chatFlow->base, base, djui_chat_message_render, djui_chat_message_destroy);
|
djui_base_init(&gDjuiChatBox->chatFlow->base, base, djui_chat_message_render, djui_chat_message_destroy);
|
||||||
|
|
Loading…
Reference in a new issue