diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 445a9855b..ce7c42ee1 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -37,6 +37,7 @@ #include "src/platform/timer.h" #include "systemtrayicon.h" #include "src/nexus.h" +#include #include #include #include @@ -54,6 +55,12 @@ #include #include +#ifdef Q_OS_ANDROID +#define IS_ON_DESKTOP_GUI 0 +#else +#define IS_ON_DESKTOP_GUI 1 +#endif + void toxActivateEventHandler(const QByteArray& data) { if (data != "$activate") @@ -285,6 +292,8 @@ Widget::~Widget() Widget* Widget::getInstance() { + assert(IS_ON_DESKTOP_GUI); // Widget must only be used on Desktop platforms + if (!instance) { instance = new Widget();