Possible crash fix
This commit is contained in:
@@ -502,8 +502,10 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//blocks placed after WorldLoadEvent didn't queue an update, so fix that.
|
Core.app.post(() -> {
|
||||||
renderer.minimap.updateAll();
|
//blocks placed after WorldLoadEvent didn't queue an update, so fix that.
|
||||||
|
renderer.minimap.updateAll();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
state.set(State.playing);
|
state.set(State.playing);
|
||||||
|
|||||||
@@ -309,6 +309,7 @@ public class MinimapRenderer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateAll(){
|
public void updateAll(){
|
||||||
|
if(pixmap.isDisposed() || texture.isDisposed()) return;
|
||||||
for(Tile tile : world.tiles){
|
for(Tile tile : world.tiles){
|
||||||
pixmap.set(tile.x, pixmap.height - 1 - tile.y, colorFor(tile));
|
pixmap.set(tile.x, pixmap.height - 1 - tile.y, colorFor(tile));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user