mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-19 15:40:31 +00:00
Don't create a ui::Timer if the UI is not available
This commit is contained in:
parent
651fa4a3b6
commit
c2f24656d7
@ -180,8 +180,12 @@ int WebSocket_connect(lua_State* L)
|
||||
ws->start();
|
||||
|
||||
if (g_connections.empty()) {
|
||||
g_timer = std::make_unique<ui::Timer>(33, ui::Manager::getDefault());
|
||||
g_timer->start();
|
||||
#ifdef ENABLE_UI
|
||||
if (App::instance()->isGui()) {
|
||||
g_timer = std::make_unique<ui::Timer>(33, ui::Manager::getDefault());
|
||||
g_timer->start();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
g_connections.insert(ws);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user