fix NPE when configuring storage busses

This commit is contained in:
PrototypeTrousers
2021-08-01 17:36:23 -03:00
parent cbdad7c58e
commit 09cbfe96d6
2 changed files with 14 additions and 10 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ aechannel=stable
aebuild=7
aegroup=appeng
aebasename=appliedenergistics2
trousers=omni-fixes-v45l
trousers=omni-fixes-v45m
#########################################################
# Versions #
@@ -368,6 +368,8 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
IItemList<IAEItemStack> before = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
boolean denyRead = false;
if( in != null )
{
if( accessChanged )
{
AccessRestriction currentAccess = (AccessRestriction) ( (ConfigManager) this.getConfigManager() ).getSetting( Settings.ACCESS );
AccessRestriction oldAccess = (AccessRestriction) ( (ConfigManager) this.getConfigManager() ).getOldSetting( Settings.ACCESS );
@@ -375,13 +377,15 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
{
denyRead = true;
}
if( accessChanged )
{
in.setBaseAccess( oldAccess );
}
before = in.getAvailableItems( before );
accessChanged = false;
in.setBaseAccess( currentAccess );
accessChanged = false;
}
else
{
before = in.getAvailableItems( before );
}
}
this.cached = false;