diff --git a/src/D2DLibExport/D2DGraphics.cs b/src/D2DLibExport/D2DGraphics.cs index c872214ca..92ca77dbd 100644 --- a/src/D2DLibExport/D2DGraphics.cs +++ b/src/D2DLibExport/D2DGraphics.cs @@ -31,7 +31,7 @@ public class D2DGraphics { internal HANDLE Handle { get; } - public D2DDevice? Device { get; } + public D2DDevice Device { get; } public D2DGraphics(D2DDevice context) : this(context.Handle) @@ -42,7 +42,8 @@ public D2DGraphics(D2DDevice context) public D2DGraphics(HANDLE handle) { this.Handle = handle; - } + this.Device = new D2DDevice(handle); + } public void BeginRender() {