File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 61
61
#include " modules/entities/entities_entity.h"
62
62
#include " modules/core/core.h"
63
63
64
+ #ifdef _WIN32
65
+ #include " Windows.h"
66
+ #endif
67
+
64
68
65
69
// -----------------------------------------------------------------------------
66
70
// Disable warnings.
@@ -374,6 +378,9 @@ void CSourcePython::Unload( void )
374
378
DevMsg (1 , MSG_PREFIX " Restoring old logging state...\n " );
375
379
LoggingSystem_PopLoggingState (false );
376
380
#endif
381
+
382
+ DevMsg (1 , MSG_PREFIX " Resetting cache notifier...\n " );
383
+ modelcache->SetCacheNotify (m_pOldMDLCacheNotifier);
377
384
378
385
DevMsg (1 , MSG_PREFIX " Shutting down python...\n " );
379
386
g_PythonManager.Shutdown ();
@@ -396,10 +403,12 @@ void CSourcePython::Unload( void )
396
403
DisconnectTier1Libraries ( );
397
404
#endif
398
405
399
- DevMsg (1 , MSG_PREFIX " Resetting cache notifier...\n " );
400
- modelcache->SetCacheNotify (m_pOldMDLCacheNotifier);
401
-
402
406
Msg (MSG_PREFIX " Unloaded successfully.\n " );
407
+
408
+ #ifdef _WIN32
409
+ // This "fixes" a crash after SP has been unloaded.
410
+ Sleep (1000 );
411
+ #endif
403
412
}
404
413
405
414
// -----------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments