Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some random null checks #33

Merged
merged 1 commit into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
aeversion=rv3
aechannel=beta
aebuild=38-GTNH
aebuild=39-GTNH
#KEEP V6 FOR MOD SUPPORT
aegroup=appeng
aebasename=appliedenergistics2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ public void detectAndSendChanges()
{
return;
}
if (getGrid() == null)
return;

final ICraftingGrid cc = this.getGrid().getCache( ICraftingGrid.class );
final ImmutableSet<ICraftingCPU> cpuSet = cc.getCpus();
Expand Down Expand Up @@ -291,6 +293,8 @@ public void detectAndSendChanges()
private IGrid getGrid()
{
final IActionHost h = ( (IActionHost) this.getTarget() );
if (h == null || h.getActionableNode() == null)
return null;
return h.getActionableNode().getGrid();
}

Expand Down Expand Up @@ -348,7 +352,7 @@ public void startJob()
originalGui = GuiBridge.GUI_PATTERN_TERMINAL_EX;
}

if( this.result != null && !this.isSimulation() )
if( this.result != null && !this.isSimulation() && getGrid() != null)
{
final ICraftingGrid cc = this.getGrid().getCache( ICraftingGrid.class );
final ICraftingLink g = cc.submitJob( this.result, null, this.getSelectedCpu() == -1 ? null : this.cpus.get( this.getSelectedCpu() ).getCpu(), true, this.getActionSrc() );
Expand Down