diff --git a/src/libslic3r/Technologies.hpp b/src/libslic3r/Technologies.hpp
index 926d51578..90c2525da 100644
--- a/src/libslic3r/Technologies.hpp
+++ b/src/libslic3r/Technologies.hpp
@@ -42,15 +42,13 @@
 #define ENABLE_THUMBNAIL_GENERATOR_DEBUG (0 && ENABLE_THUMBNAIL_GENERATOR)
 
 
-//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-////==================
-//// 2.2.0.rc1 techs
-////==================
-//#define ENABLE_2_2_0_RC1 1
-//
-//// Enable hack to remove crash when closing on OSX 10.9.5
-//#define ENABLE_HACK_CLOSING_ON_OSX_10_9_5 (1 && ENABLE_2_2_0_RC1)
-//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+//==================
+// 2.2.0.rc1 techs
+//==================
+#define ENABLE_2_2_0_RC1 1
+
+// Enable hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
+#define ENABLE_HACK_CLOSING_ON_OSX_10_9_5 (1 && ENABLE_2_2_0_RC1)
 
 
 //==================
diff --git a/src/slic3r/GUI/GLCanvas3DManager.cpp b/src/slic3r/GUI/GLCanvas3DManager.cpp
index f27525427..6430ed8e7 100644
--- a/src/slic3r/GUI/GLCanvas3DManager.cpp
+++ b/src/slic3r/GUI/GLCanvas3DManager.cpp
@@ -19,12 +19,12 @@
 #include <string>
 #include <iostream>
 
-//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-//#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
-//// Part of temporary hack to remove crash when closing on OSX 10.9.5
-//#include <wx/platinfo.h>
-//#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
-//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
+#ifdef __APPLE__
+// Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
+#include <wx/platinfo.h>
+#endif // __APPLE__
+#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
 
 #ifdef __APPLE__
 #include "../Utils/MacDarkMode.hpp"
@@ -213,13 +213,12 @@ GLCanvas3DManager::EMultisampleState GLCanvas3DManager::s_multisample = GLCanvas
 GLCanvas3DManager::EFramebufferType GLCanvas3DManager::s_framebuffers_type = GLCanvas3DManager::FB_None;
 #endif // ENABLE_NON_STATIC_CANVAS_MANAGER
 
-//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-//#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
-//#ifdef __APPLE__ 
-//GLCanvas3DManager::OSInfo GLCanvas3DManager::s_os_info;
-//#endif // __APPLE__ 
-//#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
-//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
+#ifdef __APPLE__ 
+// Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
+GLCanvas3DManager::OSInfo GLCanvas3DManager::s_os_info;
+#endif // __APPLE__ 
+#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
 
 #if !ENABLE_NON_STATIC_CANVAS_MANAGER
 GLCanvas3DManager::GLCanvas3DManager()
@@ -232,8 +231,23 @@ GLCanvas3DManager::GLCanvas3DManager()
 GLCanvas3DManager::~GLCanvas3DManager()
 {
 #if ENABLE_NON_STATIC_CANVAS_MANAGER
+#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
+#ifdef __APPLE__ 
+    // This is an ugly hack needed to solve the crash happening when closing the application on OSX 10.9.5 with newer wxWidgets
+    // The crash is triggered inside wxGLContext destructor
+    if (s_os_info.major != 10 || s_os_info.minor != 9 || s_os_info.micro != 5)
+    {
+#endif //__APPLE__
+#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
+
     if (m_context != nullptr)
         delete m_context;
+
+#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
+#ifdef __APPLE__ 
+    }
+#endif //__APPLE__
+#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
 #else
     this->destroy();
 #endif // ENABLE_NON_STATIC_CANVAS_MANAGER
@@ -260,16 +274,14 @@ bool GLCanvas3DManager::add(wxGLCanvas* canvas, Bed3D& bed, Camera& camera, GLTo
         if (m_context == nullptr)
             return false;
 
-//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-//#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
-//#ifdef __APPLE__ 
-//        // Part of temporary hack to remove crash when closing on OSX 10.9.5
-//        s_os_info.major = wxPlatformInfo::Get().GetOSMajorVersion();
-//        s_os_info.minor = wxPlatformInfo::Get().GetOSMinorVersion();
-//        s_os_info.micro = wxPlatformInfo::Get().GetOSMicroVersion();
-//#endif //__APPLE__
-//#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
-//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
+#ifdef __APPLE__ 
+        // Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
+        s_os_info.major = wxPlatformInfo::Get().GetOSMajorVersion();
+        s_os_info.minor = wxPlatformInfo::Get().GetOSMinorVersion();
+        s_os_info.micro = wxPlatformInfo::Get().GetOSMicroVersion();
+#endif //__APPLE__
+#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
     }
 
     canvas3D->set_context(m_context);
@@ -389,16 +401,14 @@ void GLCanvas3DManager::destroy()
 {
     if (m_context != nullptr)
     {
-//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-//#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
-//#ifdef __APPLE__ 
-//        // this is a temporary ugly hack to solve the crash happening when closing the application on OSX 10.9.5
-//        // the crash is inside wxGLContext destructor
-//        if (s_os_info.major == 10 && s_os_info.minor == 9 && s_os_info.micro == 5)
-//            return;
-//#endif //__APPLE__
-//#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
-//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
+#ifdef __APPLE__ 
+        // this is an ugly hack needed to solve the crash happening when closing the application on OSX 10.9.5
+        // the crash is inside wxGLContext destructor
+        if (s_os_info.major == 10 && s_os_info.minor == 9 && s_os_info.micro == 5)
+            return;
+#endif //__APPLE__
+#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
 
         delete m_context;
         m_context = nullptr;
diff --git a/src/slic3r/GUI/GLCanvas3DManager.hpp b/src/slic3r/GUI/GLCanvas3DManager.hpp
index 5f0c76cb7..428ccd96a 100644
--- a/src/slic3r/GUI/GLCanvas3DManager.hpp
+++ b/src/slic3r/GUI/GLCanvas3DManager.hpp
@@ -94,18 +94,17 @@ public:
         void detect() const;
     };
 
-//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-//#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
-//#ifdef __APPLE__ 
-//    struct OSInfo
-//    {
-//        int major{ 0 };
-//        int minor{ 0 };
-//        int micro{ 0 };
-//    };
-//#endif //__APPLE__
-//#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
-//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
+#ifdef __APPLE__ 
+    // Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
+    struct OSInfo
+    {
+        int major{ 0 };
+        int minor{ 0 };
+        int micro{ 0 };
+    };
+#endif //__APPLE__
+#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
 
 private:
 #if ENABLE_NON_STATIC_CANVAS_MANAGER
@@ -131,17 +130,16 @@ private:
     wxGLContext* m_context{ nullptr };
 #else
     wxGLContext* m_context;
-//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-//#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
-//#ifdef __APPLE__ 
-//    static OSInfo s_os_info;
-//#endif //__APPLE__
-//#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
-//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
     bool m_gl_initialized;
     CanvasesMap m_canvases;
 #endif // ENABLE_NON_STATIC_CANVAS_MANAGER
     static GLInfo s_gl_info;
+#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
+#ifdef __APPLE__ 
+    // Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
+    static OSInfo s_os_info;
+#endif //__APPLE__
+#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
     static bool s_compressed_textures_supported;
     static EMultisampleState s_multisample;
     static EFramebufferType s_framebuffers_type;