Skip to content

Commit

Permalink
Only push events when event module is initialized;
Browse files Browse the repository at this point in the history
Another solution might be retain/release.
  • Loading branch information
bjornbytes committed May 11, 2024
1 parent 5823e09 commit ee2ca02
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/event/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ void lovrEventDestroy(void) {
}

void lovrEventPush(Event event) {
if (state.ref == 0) return;

#ifndef LOVR_DISABLE_THREAD
if (event.type == EVENT_THREAD_ERROR) {
lovrRetain(event.data.thread.thread);
Expand Down

0 comments on commit ee2ca02

Please sign in to comment.