Skip to content

Crash loading export dialog #3576

@0HyperCube

Description

@0HyperCube

Reproduction

  • Open https://dev.graphite.art/
  • Create a new document with default artboard
  • Select file->export
  • Set the bounds to "Artboard"
  • Cancel the export
  • Delete the artboard (go to artboard tool, select artboard, press Del)
  • Select file->export again
  • Crash
panicked at editor/src/messages/dialog/export_dialog/export_dialog_message_handler.rs:125:99:
called `Option::unwrap()` on a `None` value

Video of reproduction

crash_export.mp4

Code

Dialogue state is stored globally for the editor and is not reset when the dialogue is closed.

dialog_message_handler: DialogMessageHandler,

The dialogue assumes that the selected artboard LayerNodeIdentifier will continue to exist, and panics if this is not the case.

let index = choices.iter().flatten().position(|(bounds, _, _)| *bounds == current_bounds).unwrap();

Metadata

Metadata

Labels

CrashA panic which crashed the editor

Type

Projects

Status

Completed This Milestone

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions