diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/Room.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/Room.java index f85ae0980..b0e3e0758 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/Room.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/Room.java @@ -105,13 +105,16 @@ public class Room extends Rect implements Graph.Node, Bundlable { private Method paint; - private Type( Class painter ) { - try { - paint = painter.getMethod( "paint", Level.class, Room.class ); - } catch (Exception e) { - ShatteredPixelDungeon.reportException(e); + Type( Class painter ) { + if (painter == null) paint = null; - } + else + try { + paint = painter.getMethod( "paint", Level.class, Room.class ); + } catch (Exception e) { + ShatteredPixelDungeon.reportException(e); + paint = null; + } } public void paint( Level level, Room room ) {