mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-04 13:30:48 +00:00
Avoid crashing when a document can't be loaded (#2453)
Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
parent
4275eaf5bf
commit
056020a56c
1 changed files with 4 additions and 1 deletions
|
@ -777,7 +777,10 @@ impl EditorHandle {
|
|||
to_front: false,
|
||||
});
|
||||
|
||||
let document = editor.dispatcher.message_handlers.portfolio_message_handler.active_document_mut().unwrap();
|
||||
let Some(document) = editor.dispatcher.message_handlers.portfolio_message_handler.active_document_mut() else {
|
||||
warn!("Document wasn't loaded");
|
||||
return;
|
||||
};
|
||||
for node in document
|
||||
.network_interface
|
||||
.document_network_metadata()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue