fix race condition: DB_READY lost when utun thread starts before gui_bridge_init

- mainwindow.cpp: swap setupMessaging() before setupNode() so g_receiver is created first
- gui_bridge_impl.cpp: add DEBUG_WARN when gui_bridge_post drops event due to NULL g_receiver
This commit is contained in:
Evgeny committed 2026-07-18 18:08:09 +03:00
1 parent 29e2527b6b
commit 0e0ad9316a
3 files changed
+8 -5

No files matched your search

+1 -1
View File
@@ -151,7 +151,7 @@ void gui_bridge_set_uasync(struct UASYNC* ua) {
}
void gui_bridge_post(int event_type, const uint8_t* data, int data_len) {
if (!g_receiver) return;
if (!g_receiver) { DEBUG_WARN(DEBUG_CATEGORY_DEBUG, "gui_bridge_post: g_receiver=NULL, dropping event %d", event_type); return; }
QByteArray d;
if (data_len > 0) d = QByteArray((const char*)data, data_len);