title: NullPointerException error with Rendering
body: <p>I am getting this error whenever I press spacebar(to shoot the 'missile'), and I can't find out how to fix it, at all.</p>
  
  <pre><code>Exception in thread "Thread-0" java.lang.NullPointerException
      at com.game.main.Bullet.render(Bullet.java:26)
      at com.game.main.Controller.render(Controller.java:58)
      at com.game.main.Game.render(Game.java:155)
      at com.game.main.Game.run(Game.java:108)
      at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>I will list the code that is in the error as I have 9 classes.</p>
  
  <p>The <code>Bullet</code> error line:</p>
  
  <pre><code>g.drawImage(tex.missile, (int)x, (int)y, null);
  </code></pre>
  
  <p><code>tex.missile</code> is a <code>BufferedImage</code> variable from the texture class, and is set to </p>
  
  <pre><code>missile = ss.grabImage(2, 1, 32, 32);
  </code></pre>
  
  <p><code>ss</code> is a <code>SpriteSheet</code> class and is set to <code>new SpriteSheet(game.getSpriteSheet());</code></p>
  
  <p>The <code>SpriteSheet</code> class just gets the <code>SpriteSheet</code> and just sets each square to a row/column etc. Everything there works as my Player &amp; Enemy both work.</p>
  
  <p>Controller error line:</p>
  
  <pre><code>tempBullet.render(g);
  </code></pre>
  
  <p>Game.render error line:</p>
  
  <pre><code>c.render(g);
  </code></pre>
  
  <p>Game.run error line:</p>
  
  <pre><code>render();
  </code></pre>
  
  <p>I highly doubt it has anything to do with the <code>Game</code> class, or anything like that, but I think it has to do with the <code>Bullet</code> class, but yet again. I could be, and most likely am wrong. I think that something may not be set correctly.</p>
  
  <p><strong>If you want me to show a whole class, I will. Just tell me which one you need.</strong></p>
  
  <p><strong>EDIT:</strong> g.drawImage is inside of this method</p>
  
  <pre><code>public void render(Graphics g){ 
      g.drawImage(tex.missile, (int)x, (int)y, null);
  }
  </code></pre>