aboutsummaryrefslogtreecommitdiff
path: root/stockton-render/src/draw/texture/repo.rs
diff options
context:
space:
mode:
Diffstat (limited to 'stockton-render/src/draw/texture/repo.rs')
-rw-r--r--stockton-render/src/draw/texture/repo.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/stockton-render/src/draw/texture/repo.rs b/stockton-render/src/draw/texture/repo.rs
index d5200be..8191f7b 100644
--- a/stockton-render/src/draw/texture/repo.rs
+++ b/stockton-render/src/draw/texture/repo.rs
@@ -129,8 +129,11 @@ impl<'a> TextureRepo<'a> {
})
}
- pub fn get_ds_layout(&self) -> RwLockReadGuard<DescriptorSetLayoutT> {
- self.ds_layout.read().unwrap()
+ pub fn get_ds_layout(&self) -> Result<RwLockReadGuard<DescriptorSetLayoutT>> {
+ self.ds_layout
+ .read()
+ .map_err(|_| LockPoisoned::Other)
+ .context("Error locking descriptor set layout")
}
pub fn queue_load(&mut self, block_id: BlockRef) -> Result<()> {