mirror of
https://github.com/simonbrunel/qtpromise.git
synced 2024-11-27 13:49:06 +08:00
Update qpromise_p.h
BUGFIX: prevent events calling functions after qcoreapp shutdown.
This commit is contained in:
parent
f382ad25fc
commit
166ec94f27
@ -55,7 +55,7 @@ static void qtpromise_defer(F&& f, const QPointer<QThread>& thread)
|
||||
{
|
||||
Event(FType&& f) : QEvent{QEvent::None}, m_f{std::move(f)} { }
|
||||
Event(const FType& f) : QEvent{QEvent::None}, m_f{f} { }
|
||||
~Event() override { m_f(); }
|
||||
~Event() override { if (!QCoreApplication::closingDown()) {m_f();} }
|
||||
FType m_f;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user