mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 13:10:54 +00:00
Log instead of panicking when we can't retrieve a drawable
This commit is contained in:
parent
f611b443c0
commit
1e85361914
1 changed files with 9 additions and 1 deletions
|
@ -189,7 +189,15 @@ impl Renderer {
|
|||
pub fn render(&mut self, scene: &Scene) {
|
||||
let layer = self.layer.clone();
|
||||
let drawable_size = layer.drawable_size();
|
||||
let drawable = layer.next_drawable().unwrap();
|
||||
let drawable = if let Some(drawable) = layer.next_drawable() {
|
||||
drawable
|
||||
} else {
|
||||
log::error!(
|
||||
"failed to retrieve next drawable, drawable size: {:?}",
|
||||
drawable_size
|
||||
);
|
||||
return;
|
||||
};
|
||||
let command_queue = self.command_queue.clone();
|
||||
let command_buffer = command_queue.new_command_buffer();
|
||||
|
||||
|
|
Loading…
Reference in a new issue