Internal error when ungrouping selection while export panel is open

Summary:

Inkscape crashes when I ungroup something that's currently selected while the export panel is focussed on that selection, if "Export Selected Only" is checked.

Steps to reproduce:

  • open export panel (ctrl-shift-E)
  • draw anything
  • click "Selection, and check "Export Selected Only"
  • group (ctrl-G) and ungroup (ctrl-shift-G)

What happened?

  • 💥 The "Internal Error" message shows, after which Inkscape force closes.

What should have happened?

  • No crash.

Demonstration

inkscape-group-export-crash

Version info

Inkscape 1.2 (dc2aedaf03, 2022-05-15)

    GLib version:     2.72.2
    GTK version:      3.24.34
    glibmm version:   2.66.4
    gtkmm version:    3.24.6
    libxml2 version:  2.9.14
    libxslt version:  1.1.35
    Cairo version:    1.17.6
    Pango version:    1.50.7
    HarfBuzz version: 4.3.0

    OS version:       Arch Linux