diff options
Diffstat (limited to 'intern/ghost/intern/GHOST_WindowWin32.cpp')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 4d8e0d492d9..50ee9385e39 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -624,11 +624,9 @@ GHOST_Context *GHOST_WindowWin32::newDrawingContext(GHOST_TDrawingContextType ty GHOST_Context *context; context = new GHOST_ContextD3D(false, m_hWnd); - if (context->initializeDrawingContext()) { - return context; - } - else { + if (!context->initializeDrawingContext()) { delete context; + context = nullptr; } return context; |