Deleting the ID of a gradient in the XML editor leads to a crash when Selectors & CSS dialog is open

Steps to reproduce:

  • open Inkscape
  • open Selectors & CSS dialog
  • open XML editor dialog
  • create a rectangle
  • set fill to radial gradient
  • go to the radial gradient in the defs of the XML editor
  • delete the ID attribute

What happened?

Crash: inkscape_backtrace.txt

What should have happened?

No crash :)

Inkscape Version and Operating System:

  • Inkscape Version: 1.1-dev (03ae7f7, 2020-01-04)
  • Operating System: Windows 10
  • Operating System version: 10.0.18362