[Bf-blender-cvs] [93cdf461f3a] master: macOS/Ghost: Remove redundant nil check after initWithContentRect

Corbin Dunn noreply at git.blender.org
Wed Mar 3 16:59:19 CET 2021


Commit: 93cdf461f3a66fb43716ddb99cf186fd0ff9ed91
Author: Corbin Dunn
Date:   Wed Mar 3 21:26:09 2021 +0530
Branches: master
https://developer.blender.org/rB93cdf461f3a66fb43716ddb99cf186fd0ff9ed91

macOS/Ghost: Remove redundant nil check after initWithContentRect

AppKitā€™s NSWindow.h has NS_ASSUME_NONNULL_BEGIN, and only methods/
properties explicitly marked nullable will ever return nil.

Reviewed By: #platform_macos, sebbas
Differential Revision: https://developer.blender.org/D10603

===================================================================

M	intern/ghost/intern/GHOST_WindowCocoa.mm

===================================================================

diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index 73927317b24..add7962d924 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -336,11 +336,6 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(GHOST_SystemCocoa *systemCocoa,
                                               backing:NSBackingStoreBuffered
                                                 defer:NO];
 
-  if (m_window == nil) {
-    [pool drain];
-    return;
-  }
-
   [m_window setSystemAndWindowCocoa:systemCocoa windowCocoa:this];
 
   // Forbid to resize the window below the blender defined minimum one



More information about the Bf-blender-cvs mailing list