Hopefully a workaround for crashes and hang ups at closing on Windows.

Release the OpenGL contexts not by a destructor of a static class,
but explicitely (predictively).
This commit is contained in:
bubnikv 2019-08-22 20:02:25 +02:00
parent c6604ff55d
commit 0de566e2a2
5 changed files with 22 additions and 6 deletions

View file

@ -48,6 +48,7 @@
#ifdef SLIC3R_GUI
#include "slic3r/GUI/GUI.hpp"
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/3DScene.hpp"
#endif /* SLIC3R_GUI */
using namespace Slic3r;
@ -505,7 +506,10 @@ int CLI::run(int argc, char **argv)
if (! m_extra_config.empty())
gui->mainframe->load_config(m_extra_config);
});
return wxEntry(argc, argv);
int result = wxEntry(argc, argv);
//FIXME this is a workaround for the PrusaSlicer 2.1 release.
_3DScene::destroy();
return result;
#else /* SLIC3R_GUI */
// No GUI support. Just print out a help.
this->print_help(false);