diff --git a/etg/graphics.py b/etg/graphics.py index 28808563..e117e0e2 100644 --- a/etg/graphics.py +++ b/etg/graphics.py @@ -219,7 +219,8 @@ def run(): @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)