Skip to content

Commit

Permalink
Fixed a crash when you exported and didn't have IPC installed.
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewBlanchard committed Jan 4, 2023
1 parent 2b3c855 commit 14717e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/editor/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use glifparser::glif::contour::MFEKContourCommon;
use glifparser::glif::mfek::{Layer, MFEKGlif};
use glifparser::{Glif, MFEKPointData};
use log;
use mfek_ipc::IPCInfo;
use plist;

use std::{
Expand Down Expand Up @@ -182,7 +183,7 @@ impl Editor {
temp.file_name().unwrap().to_owned()
};
let glif_name = self.with_glyph(|g| g.name.clone());
let ipc_info = self.ipc_info.clone().expect("Cannot export w/o IPC data");
let ipc_info = self.ipc_info.clone().unwrap_or(IPCInfo::default());

// `self.preview` contains flattened versions of all the layers, which are always cubic Bézier
// splines. We know it's Some(_) because we rebuilt above.
Expand Down

0 comments on commit 14717e2

Please sign in to comment.