Add missing is_some check
This commit is contained in:
parent
02120b3263
commit
2f7e9853aa
@ -422,7 +422,9 @@ fn choose_file(ui: Rc<RefCell<Ui>>, window: &ApplicationWindow) {
|
||||
if response == ResponseType::Accept {
|
||||
let path = d.file().unwrap().path().unwrap();
|
||||
|
||||
ui.borrow().document_canvas.as_ref().unwrap().purge_cache();
|
||||
if ui.borrow().document_canvas.is_some() {
|
||||
ui.borrow().document_canvas.as_ref().unwrap().purge_cache();
|
||||
}
|
||||
|
||||
load_document(path, Rc::clone(&ui), 0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user