Fix monitors fetching palette when there is no terminal

This commit is contained in:
Lignum 2017-05-06 20:23:44 +02:00
parent ac2382a861
commit a9e7acbec5
No known key found for this signature in database
GPG Key ID: 0889206F5A8A700D
1 changed files with 2 additions and 2 deletions

View File

@ -49,8 +49,6 @@ private void renderMonitorAt( TileMonitor monitor, double posX, double posY, dou
return;
}
Palette palette = origin.getTerminal().getTerminal().getPalette();
// Ensure each monitor is rendered only once
long renderFrame = ComputerCraft.getRenderFrame();
if( origin.m_lastRenderFrame == renderFrame )
@ -107,6 +105,8 @@ private void renderMonitorAt( TileMonitor monitor, double posX, double posY, dou
{
if( terminal != null )
{
Palette palette = terminal.getPalette();
// Allocate display lists
if( origin.m_renderDisplayList < 0 )
{