diff --git a/plugins/zzogl-pg/opengl/GSmain.cpp b/plugins/zzogl-pg/opengl/GSmain.cpp index d52ebac4d..da2ac7b04 100644 --- a/plugins/zzogl-pg/opengl/GSmain.cpp +++ b/plugins/zzogl-pg/opengl/GSmain.cpp @@ -350,10 +350,12 @@ EXPORT_C_(void) GSclose() FUNCLOG ZZDestroy(); + // Clean shader. Must be done before the context is delete + ZZshExitCleaning(); + GLWin.CloseWindow(); // Free alocated memory. We could close plugin without closing pcsx2, so we SHOULD free all allocated resources - ZZshExitCleaning(); SaveStateFile = NULL; SaveStateExists = true; // default value g_LastCRC = 0;