Fix race condition in FilamentPanel (#287)
This commit is contained in:
@@ -197,6 +197,11 @@ public class FilamentPanel extends JPanel implements FilamentTarget {
|
||||
if (mNativeSurface == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Previous frames using this surface may still be in the pipeline, so we must wait for
|
||||
// them to finish.
|
||||
engine.flushAndWait();
|
||||
|
||||
mNativeSurface.dispose();
|
||||
engine.destroySwapChain(mSwapChain);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user