[fix] Fixed an issue that couldn't run script without elements.

This commit is contained in:
falsycat 2019-10-07 00:00:00 +00:00
parent f8c1793dfc
commit 7ec65a3625

View File

@ -56,8 +56,10 @@ struct ElementScheduledControllerFactory(ScheduledController, ElementDrawer)
builder.AddScheduledController(
new ScheduledController(element, varstore_, serial));
}
if (elements[].length > 0) {
builder.AddElementDrawer(new ElementDrawer(program_, elements[]));
}
}
private:
ElementProgram program_;