Files
chatterino2/src/debug/AssertInGuiThread.hpp
2018-06-26 16:37:59 +02:00

17 lines
286 B
C++

#pragma once
#include <QCoreApplication>
#include <QThread>
#include <cassert>
namespace chatterino {
static void assertInGuiThread()
{
#ifdef _DEBUG
assert(QCoreApplication::instance()->thread() == QThread::currentThread());
#endif
}
} // namespace chatterino