Crash closing document with Filter Editors dialog floating

Steps to reproduce:

  • Open Inkscape
  • Draw a rectangle
  • Apply Filter > Fill and Transparency > Fast Crop
  • Keep rectangle selected
  • Open a new (Inkscape) window and repeat
  • Open the Filter Editor Dialog
  • Make sure the dialog is floating (default in 1.2-dev)
  • Switch to the first Inkscape window
  • Close window (without saving)
  • Click on the last Inkscape window

What happened?

What should have happened?

  • No crash

Sample attachments: backtrace inkscape_backtrace_filter_dialog_close_window.txt

Version info

  • Inkscape 1.2-dev (6a387c76, 2021-08-16) Linux Mint 20
  • Inkscape 1.1 (22cf7852, 2021-08-02) Linux Mint 20

Not replicated Inkscape 1.0.x (f38d80df, 2021-05-16) Linux Mint 20

Appears to be introduced in dialog rewrite (c2d0ea12)