Fix segfault on CLI mode because activeInk() tries to access to the color bar

This commit is contained in:
David Capello 2019-03-16 13:46:09 -03:00
parent 25189224b9
commit 7aec117b5e

View File

@ -204,7 +204,7 @@ int App_toolStroke(lua_State* L)
// Select tool by name
tools::Tool* tool = App::instance()->activeToolManager()->activeTool();
tools::Ink* ink = App::instance()->activeToolManager()->activeInk();
tools::Ink* ink = tool->getInk(0);
int type = lua_getfield(L, 1, "tool");
if (type == LUA_TSTRING) {
const char* toolId = lua_tostring(L, -1);