refactor: Add asserts to check executing in worker thread

This commit is contained in:
Lars Toenning
2025-06-09 14:21:45 +02:00
parent 95e45b68d3
commit 5fe2c5c3dd
4 changed files with 4 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ namespace swift::core::vatsim
void CVatsimStatusFileReader::readInBackgroundThread()
{
Q_ASSERT_X(hasStarted(), Q_FUNC_INFO, "Thread was not started yet!");
QPointer<CVatsimStatusFileReader> myself(this);
QTimer::singleShot(0, this, [=] {
if (!myself) { return; }