mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-18 07:21:09 +00:00
lua: Fix crash calling app.refresh() from a script using -b -script from CLI
This commit is contained in:
parent
7507c2e4eb
commit
66864beb77
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2018-2019 Igara Studio S.A.
|
||||
// Copyright (C) 2018-2020 Igara Studio S.A.
|
||||
// Copyright (C) 2015-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -229,7 +229,9 @@ int App_alert(lua_State* L)
|
||||
int App_refresh(lua_State* L)
|
||||
{
|
||||
#ifdef ENABLE_UI
|
||||
app_refresh_screen();
|
||||
app::Context* ctx = App::instance()->context();
|
||||
if (ctx && ctx->isUIAvailable())
|
||||
app_refresh_screen();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user