mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-02 15:28:12 +08:00
Avoid crashing when a document can't be loaded (#2453)
Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
4275eaf5bf
commit
056020a56c
@@ -777,7 +777,10 @@ impl EditorHandle {
|
|||||||
to_front: false,
|
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
|
for node in document
|
||||||
.network_interface
|
.network_interface
|
||||||
.document_network_metadata()
|
.document_network_metadata()
|
||||||
|
|||||||
Reference in New Issue
Block a user