Skip to content

Commit

Permalink
Fix texture view cleanup (#3254)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-cojocaru authored Feb 25, 2025
1 parent 50db49d commit 35a5428
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ public VulkanTextureViewRenderThread(@NonNull TextureView textureView, @NonNull
super(textureView, mapRenderer);
}

void cleanup() {
if (surface == null) {
return;
}

mapRenderer.onSurfaceDestroyed();
surface.release();
surface = null;
}

// Thread implementation

@Override
Expand Down Expand Up @@ -121,6 +131,7 @@ public void run() {

// Signal we're done
synchronized (lock) {
cleanup();
this.exited = true;
lock.notifyAll();
}
Expand Down

0 comments on commit 35a5428

Please sign in to comment.