Skip to content
Permalink
Browse files

Ensure the context is not None before assigning to it

  • Loading branch information...
RobinD42 committed Sep 5, 2019
1 parent d09910f commit 676e588c76def451ba70bf5e3f1e14f74120efbe
Showing with 2 additions and 1 deletion.
  1. +2 −1 etg/graphics.py
@@ -219,7 +219,8 @@ def _ctx_hold_ref(f):
@wraps(f)
def wrapper(self, obj):
ctx = f(self, obj)
ctx._obj = obj
if ctx is not None:
ctx._obj = obj
return ctx
return wrapper
GraphicsRenderer.CreateContext = _ctx_hold_ref(GraphicsRenderer.CreateContext)

0 comments on commit 676e588

Please sign in to comment.
You can’t perform that action at this time.