NPE in console

This commit is contained in:
rusefi 2021-09-30 15:01:50 -04:00
parent 60d8525fc0
commit e1e0c11595
2 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@ import java.net.URL;
import java.util.concurrent.atomic.AtomicReference;
public class rusEFIVersion {
public static final int CONSOLE_VERSION = 20210928;
public static final int CONSOLE_VERSION = 20210930;
public static AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
public static long classBuildTimeMillis() {

View File

@ -1,6 +1,7 @@
package com.rusefi;
import com.rusefi.autodetect.PortDetector;
import com.rusefi.autodetect.SerialAutoChecker;
import com.rusefi.autoupdate.Autoupdate;
import com.rusefi.autoupdate.AutoupdateUtil;
import com.rusefi.io.LinkManager;
@ -238,7 +239,8 @@ public class StartupFrame {
BaudRateHolder.INSTANCE.baudRate = Integer.parseInt((String) comboSpeeds.getSelectedItem());
String selectedPort = comboPorts.getSelectedItem().toString();
if (SerialPortScanner.AUTO_SERIAL.equals(selectedPort)) {
String autoDetectedPort = PortDetector.autoDetectPort(StartupFrame.this.frame).getSerialPort();
SerialAutoChecker.AutoDetectResult detectResult = PortDetector.autoDetectPort(StartupFrame.this.frame);
String autoDetectedPort = detectResult == null ? null : detectResult.getSerialPort();
if (autoDetectedPort == null)
return;
selectedPort = autoDetectedPort;