fix: skip saved connections this build cannot create

CanConFactory::create() returns nullptr for a type the platform does not
support, and loadConnections() handed that straight to the model, which
appends it to the connection list unguarded. Every later iteration over that
list then dereferences it.

Reachable by carrying a settings file holding a gs_usb connection from
Windows to another platform, and by any saved type id the factory does not
recognise.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XZnuZJ7zc3e8hk6C8bGDZN
This commit is contained in:
Refuhr
2026-08-03 13:12:52 +02:00
co-authored by Claude Opus 5
parent 1f1861485d
commit 2c8f9c6c23
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -88,7 +88,7 @@
<item row="8" column="0">
<widget class="QRadioButton" name="rbGSUSB">
<property name="text">
<string>gs_usb (candleLight, CANable, CANnectivity)</string>
<string>gs_usb (over WinUSB)</string>
</property>
</widget>
</item>