Skip to content

Commit

Permalink
Fix two more crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
buthed010203 committed Oct 9, 2024
1 parent cba5065 commit 9027fad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/mindustry/client/Client.kt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ object Client {
if (showingTurrets || showingInvTurrets) {
val enemyunits = Core.settings.getBool("enemyunitranges")
val showall = Core.settings.getBool("showallturrets")
val flying = player.unit() == null || player.unit().isFlying
val flying = player.unit()?.isFlying
val mousev = Core.input.mouseWorld()
val mouseBuild = world.buildWorld(mousev.x, mousev.y)
getTree().use {
Expand Down
2 changes: 1 addition & 1 deletion core/src/mindustry/world/blocks/storage/Unloader.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public void draw(){

Draw.color(sortItem == null ? customNullLoader ? Pal.lightishGray : Color.clear : sortItem.color);
Draw.rect(centerRegion, x, y);
if(drawUnloaderItems && possibleBlocks.size >= 2 && lastItem != null && dumpingFrom != null && dumpingTo != null && enabled){
if(drawUnloaderItems && possibleBlocks.size >= 2 && lastItem != null && dumpingFrom != null && dumpingTo != null && dumpingFrom.building != null && dumpingTo.building != null && enabled){
Draw.color(lastItem.color, 0.67f);
Draw.rect("unloader-center", x, y);
Draw.alpha(1f);
Expand Down

0 comments on commit 9027fad

Please sign in to comment.