Assigned mapping parameter to instance variable, preventing NullPointerException during parseEvent

This commit is contained in:
Christian Schwartz
2014-01-21 19:00:02 +00:00
parent 907f30d9e3
commit ad692bead2

View File

@@ -36,6 +36,7 @@ public class EvdevHandler implements Runnable {
public EvdevHandler(NvConnection conn, String device, GamepadMapping mapping) throws FileNotFoundException, IOException {
this.conn = conn;
this.mapping = mapping;
File file = new File(device);
if (!file.exists())
throw new FileNotFoundException("File " + device + " not found");