Skip to content

Commit

Permalink
Prevent extra errors when canvascontext creation fails (#635)
Browse files Browse the repository at this point in the history
Co-authored-by: Korijn van Golen <[email protected]>
  • Loading branch information
almarklein and Korijn authored Nov 4, 2024
1 parent 066477f commit 25a4d9c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wgpu/backends/wgpu_native/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ class GPUCanvasContext(classes.GPUCanvasContext):
# we can give meaningful errors/warnings on invalid use, rather than
# the more cryptic Rust panics.

_surface_id = ffi.NULL

def __init__(self, canvas):
super().__init__(canvas)

Expand Down

0 comments on commit 25a4d9c

Please sign in to comment.