Guard QTimer::singleShot

This commit is contained in:
Klaus Basan
2018-05-06 20:24:40 +02:00
committed by Roland Winklmeier
parent 3ecb7b1f94
commit 3f4cb7529c
4 changed files with 33 additions and 8 deletions

View File

@@ -32,7 +32,13 @@ namespace BlackGui
this->setPlaceholderText(".dot commands");
}
QTimer::singleShot(5000, &m_dsCommandTooltip, &CDigestSignal::inputSignal);
const QPointer<CCommandInput> myself(this);
QTimer::singleShot(5000, this, [ = ]
{
if (!myself) { return; }
m_dsCommandTooltip.inputSignal();
});
if (sGui && sGui->supportsContexts())
{
if (sGui->getIContextSimulator())