Kicad schematic crash after undoing line draw abort

Description

Kicad 9's schematic editor crashes when trying to undo an aborted line draw attempt.

Steps to reproduce

  1. Start drawing a line (don't commit it)
  2. Hit "e" hotkey to open Line properties, click OK (mandatory step)
  3. Hit Esc to abort drawing line
  4. Press Ctrl+Z to undo abort (as you wanted to bring line back)
  5. Say "Bye, bye" to your schematic diagram, and watch as Kicad force closes.

KiCad Version

Application: KiCad x64 on x64

Version: 9.0.7-rc2, release build

Libraries: wxWidgets 3.2.8 FreeType 2.13.3 HarfBuzz 12.2.0 FontConfig 2.15.0 libcurl/8.17.0-DEV Schannel zlib/1.3.1

Platform: Windows 11 (build 26100), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info: Date: Dec 24 2025 04:44:30 wxWidgets: 3.2.8 (wchar_t,wx containers) Boost: 1.89.0 OCC: 7.9.2 Curl: 8.17.0-DEV ngspice: 45.2 Compiler: Visual C++ 1944 without C++ ABI KICAD_IPC_API=ON

Locale: Lang: en_GB Enc: UTF-8 Num: 1,234.5 Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)