File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -458,9 +458,9 @@ impl Buffer {
458
458
. ok_or_else ( || DestroyedResourceError ( self . error_ident ( ) ) )
459
459
}
460
460
461
- pub ( crate ) fn check_destroyed < ' a > (
462
- & ' a self ,
463
- guard : & ' a SnatchGuard ,
461
+ pub ( crate ) fn check_destroyed (
462
+ & self ,
463
+ guard : & SnatchGuard ,
464
464
) -> Result < ( ) , DestroyedResourceError > {
465
465
self . raw
466
466
. get ( guard)
@@ -1217,6 +1217,16 @@ impl Texture {
1217
1217
. ok_or_else ( || DestroyedResourceError ( self . error_ident ( ) ) )
1218
1218
}
1219
1219
1220
+ pub ( crate ) fn check_destroyed (
1221
+ & self ,
1222
+ guard : & SnatchGuard ,
1223
+ ) -> Result < ( ) , DestroyedResourceError > {
1224
+ self . inner
1225
+ . get ( guard)
1226
+ . map ( |_| ( ) )
1227
+ . ok_or_else ( || DestroyedResourceError ( self . error_ident ( ) ) )
1228
+ }
1229
+
1220
1230
pub ( crate ) fn get_clear_view < ' a > (
1221
1231
clear_mode : & ' a TextureClearMode ,
1222
1232
desc : & ' a wgt:: TextureDescriptor < ( ) , Vec < wgt:: TextureFormat > > ,
@@ -1810,6 +1820,7 @@ impl TextureView {
1810
1820
& ' a self ,
1811
1821
guard : & ' a SnatchGuard ,
1812
1822
) -> Result < & ' a dyn hal:: DynTextureView , DestroyedResourceError > {
1823
+ self . parent . check_destroyed ( guard) ?;
1813
1824
self . raw
1814
1825
. get ( guard)
1815
1826
. map ( |it| it. as_ref ( ) )
You can’t perform that action at this time.
0 commit comments