mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-09 01:16:04 +00:00
fixed an NPE when there wasn’t a mapping for a component
This commit is contained in:
@@ -263,7 +263,11 @@ public class GamepadConfigFrame extends JFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setButtonText(JButton button, SourceComponent comp) {
|
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 {
|
private class MappingThread extends Thread implements DeviceListener {
|
||||||
|
|||||||
Reference in New Issue
Block a user