diff options
Diffstat (limited to 'compat/run-in-thread.hpp')
-rw-r--r-- | compat/run-in-thread.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compat/run-in-thread.hpp b/compat/run-in-thread.hpp index afe279f2..b8ffc179 100644 --- a/compat/run-in-thread.hpp +++ b/compat/run-in-thread.hpp @@ -53,7 +53,7 @@ struct run_in_thread_traits<void> } template<typename F> -auto cc_noinline +auto never_inline run_in_thread_sync(QObject* obj, F&& fun) -> typename qt_impl_detail::run_in_thread_traits<decltype(fun())>::ret_type { @@ -108,8 +108,8 @@ template<typename F> void run_in_thread_async(QObject* obj, F&& fun) { QObject src; - QThread* t(obj->thread()); - assert(t); + QThread* t = obj->thread(); + if (!t) abort(); src.moveToThread(t); QObject::connect(&src, &QObject::destroyed, obj, std::move(fun), Qt::AutoConnection); } |