From fba61eb686f4d13797da3e1663ca853a863a1a18 Mon Sep 17 00:00:00 2001 From: Diego Waxemberg Date: Mon, 30 Dec 2013 22:39:29 -0500 Subject: [PATCH] =?UTF-8?q?fixed=20an=20NPE=20when=20there=20wasn=E2=80=99?= =?UTF-8?q?t=20a=20mapping=20for=20a=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/limelight/gui/GamepadConfigFrame.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/limelight/gui/GamepadConfigFrame.java b/src/com/limelight/gui/GamepadConfigFrame.java index 3702037..40ddb7f 100644 --- a/src/com/limelight/gui/GamepadConfigFrame.java +++ b/src/com/limelight/gui/GamepadConfigFrame.java @@ -263,7 +263,11 @@ public class GamepadConfigFrame extends JFrame { } private void setButtonText(JButton button, SourceComponent comp) { - button.setText(comp.getType().name() + " " + comp.getId()); + if (comp == null) { + button.setText(""); + } else { + button.setText(comp.getType().name() + " " + comp.getId()); + } } private class MappingThread extends Thread implements DeviceListener {