mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-30 10:03:58 +01:00
use Registry.get() for device_set_device_lost_closure
This commit is contained in:
1 parent
c4d71d9af5
commit
b904e2c759
1 file changed
+1
-1
@@ -2388,7 +2388,7 @@ impl Global {
|
||||
) {
|
||||
let hub = A::hub(self);
|
||||
|
||||
if let Ok(Some(device)) = hub.devices.try_get(device_id) {
|
||||
if let Ok(device) = hub.devices.get(device_id) {
|
||||
let mut life_tracker = device.lock_life();
|
||||
if let Some(existing_closure) = life_tracker.device_lost_closure.take() {
|
||||
// It's important to not hold the lock while calling the closure.
|
||||
|
||||
Reference in new issue
Block a user