From 79134ba6651069f9829a73ffe0fbd1d624063c0e Mon Sep 17 00:00:00 2001 From: Jan Haller Date: Wed, 19 Feb 2014 15:33:10 +0100 Subject: [PATCH] Removed unnecessary null pointer checks in Window.cpp Fixes #532 --- src/SFML/Window/Window.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/SFML/Window/Window.cpp b/src/SFML/Window/Window.cpp index e683ec3bd..a2f71c755 100644 --- a/src/SFML/Window/Window.cpp +++ b/src/SFML/Window/Window.cpp @@ -144,19 +144,13 @@ void Window::create(WindowHandle handle, const ContextSettings& settings) //////////////////////////////////////////////////////////// void Window::close() { - if (m_context) - { - // Delete the context - delete m_context; - m_context = NULL; - } + // Delete the context + delete m_context; + m_context = NULL; - if (m_impl) - { - // Delete the window implementation - delete m_impl; - m_impl = NULL; - } + // Delete the window implementation + delete m_impl; + m_impl = NULL; // Update the fullscreen window if (this == fullscreenWindow)