Ref T786, further checks (shutdown, empty values)

This commit is contained in:
Klaus Basan
2020-04-20 00:05:58 +02:00
committed by Mat Sutcliffe
parent 2156eb1831
commit 17cebfb8d3
4 changed files with 14 additions and 5 deletions

View File

@@ -897,8 +897,11 @@ namespace BlackSimPlugin
void CSimulatorXPlane::injectWeatherGrid(const CWeatherGrid &weatherGrid)
{
if (this->isShuttingDownOrDisconnected()) { return; }
if (weatherGrid.isEmpty()) { return; }
if (!CThreadUtils::isCurrentThreadObjectThread(this))
{
BLACK_VERIFY_X(!CBuildConfig::isLocalDeveloperDebugBuild(), Q_FUNC_INFO, "Wrong thread");
QPointer<CSimulatorXPlane> myself(this);
QTimer::singleShot(0, this, [ = ]