Skip to content

Commit 8cd0f7b

Browse files
COM Ports not found hard crash fix
Co-Authored-By: VashBaldeus <vashbaldeus@gmail.com>
1 parent 4674204 commit 8cd0f7b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

PS5 NOR Modifier/MainWindow.axaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ public MainWindow()
4545
private void RefreshComPorts()
4646
{
4747
string[] ports = SerialPort.GetPortNames();
48+
if (ports == null || ports.Length == 0)
49+
{
50+
ShowError("No available COM ports were detected.");
51+
return;
52+
}
53+
4854
ComPorts.Items.Clear();
4955
foreach (string port in ports)
5056
{

0 commit comments

Comments
 (0)