v2.4.0: added a safety check to hero info button
This commit is contained in:
@@ -153,11 +153,14 @@ public class HeroSelectScene extends PixelScene {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
super.onClick();
|
||||
Window w = new WndHeroInfo(GamesInProgress.selectedClass);
|
||||
if (landscape()){
|
||||
w.offset(Camera.main.width/6, 0);
|
||||
HeroClass cls = GamesInProgress.selectedClass;
|
||||
if (cls != null) {
|
||||
Window w = new WndHeroInfo(GamesInProgress.selectedClass);
|
||||
if (landscape()) {
|
||||
w.offset(Camera.main.width / 6, 0);
|
||||
}
|
||||
ShatteredPixelDungeon.scene().addToFront(w);
|
||||
}
|
||||
ShatteredPixelDungeon.scene().addToFront(w);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user