Check if the component has been successfully loaded before rendering the component

This commit is contained in:
Liu Peng
2020-03-17 20:14:07 +08:00
parent 36cf766136
commit 225a5b0fac

View File

@ -49,6 +49,9 @@ mixin ComposedComponent on Component, HasGameRef, Tapable {
}
void _renderComponent(Canvas canvas, Component c) {
if (!c.loaded()) {
return;
}
c.render(canvas);
canvas.restore();
canvas.save();