From afdec21cab8568ee98dfaf0b38c84e02eec6c67e Mon Sep 17 00:00:00 2001 From: maik klein Date: Thu, 5 Jan 2017 08:40:22 +0100 Subject: [PATCH] Adds an entry loading error --- src/entry.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/entry.rs b/src/entry.rs index a42e8e1..25886dc 100644 --- a/src/entry.rs +++ b/src/entry.rs @@ -68,6 +68,7 @@ pub trait EntryV1_0 { Ok(Instance::from_raw(instance, instance_fp)) } } + fn enumerate_instance_layer_properties(&self) -> VkResult> { unsafe { let mut num = 0; @@ -134,7 +135,7 @@ impl Entry { } Err(ref err) => Err(LoadingError::LibraryLoadError(err.clone())), }?; - let entry_fn = unsafe { V::EntryFp::load(&static_fn).unwrap() }; + let entry_fn = unsafe { V::EntryFp::load(&static_fn).map_err(|err| LoadingError::EntryLoadError(err))? }; Ok(Entry { static_fn: static_fn, entry_fn: entry_fn,