Skip to content

Commit

Permalink
Prevent extra errors when canvascontext creation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein committed Nov 4, 2024
1 parent c0cc97f commit 7aa26cc
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 7aa26cc

Please sign in to comment.