Fixed #6865 / Fixed headless canvas crash

This commit is contained in:
Anuken
2022-06-08 09:36:08 -04:00
parent 6989a81e03
commit df082c39a3
2 changed files with 4 additions and 0 deletions

View File

@@ -56,6 +56,8 @@ public class CanvasBlock extends Block{
public byte[] data = new byte[Mathf.ceil(canvasSize * canvasSize * bitsPerPixel / 8f)];
public void updateTexture(){
if(headless) return;
Pixmap pix = makePixmap();
if(texture != null){
texture.draw(pix);