Defer texture destruction in ImguiBridge to prevent use-after-free.
PiperOrigin-RevId: 935327326 Change-Id: I12a148b71abbe50581c7977a1f6dc5e220c40e81
This commit is contained in:
committed by
Copybara-Service
parent
9ac0b283dc
commit
2cacf17071
@@ -203,7 +203,7 @@ void ImguiBridge::Update() {
|
||||
} else if (tex->Status == ImTextureStatus_WantUpdates) {
|
||||
UpdateTexture(tex);
|
||||
} else if (tex->Status == ImTextureStatus_WantDestroy &&
|
||||
tex->UnusedFrames > 0) {
|
||||
tex->UnusedFrames >= 3) {
|
||||
DestroyTexture(tex);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user