mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-16 05:40:56 +00:00
fixed an NPE when there wasn’t a mapping for a component
This commit is contained in:
@@ -263,8 +263,12 @@ public class GamepadConfigFrame extends JFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setButtonText(JButton button, SourceComponent comp) {
|
private void setButtonText(JButton button, SourceComponent comp) {
|
||||||
|
if (comp == null) {
|
||||||
|
button.setText("");
|
||||||
|
} else {
|
||||||
button.setText(comp.getType().name() + " " + comp.getId());
|
button.setText(comp.getType().name() + " " + comp.getId());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private class MappingThread extends Thread implements DeviceListener {
|
private class MappingThread extends Thread implements DeviceListener {
|
||||||
private SourceComponent newMapping = null;
|
private SourceComponent newMapping = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user