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:
1 parent
29e2527b6b
commit
0e0ad9316a
3 files changed
+8
-5
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user