when i die i just get the null pointer exception


private void prepare() { System.out.println("Counter object is null: "+(counter == null)); TryAgain tryagain = new TryAgain(); addObject(tryagain, 681, 551); laughingSkull laughingskull = new laughingSkull(); addObject(laughingskull, 683, 119); addObject(counter, 462, 575); counter.setLocation(454, 568); ; }