[Fix] (...): Avoid some weird crashes.

This commit is contained in:
BZLZHH
2026-01-01 00:41:23 +08:00
parent 7c2380ccce
commit ee4dc70336
10 changed files with 173 additions and 154 deletions
+3 -2
View File
@@ -7,6 +7,7 @@
#include <gtest/gtest.h>
#include "Includes.h"
#include "Init.h"
#include "MG_Impl/GLImpl/Program/GL_Program.h"
#include "MG_State/GLState/Core.h"
#include "MG_Util/ShaderTranspiler/ShaderCompiler.h"
@@ -16,9 +17,9 @@ using namespace MobileGL::MG_Impl::GLImpl;
class ProgramTest : public ::testing::Test {
protected:
void SetUp() override { MG_State::pGLContext = new MG_State::GLState::GLContext(); }
void SetUp() override { MobileGL::MG_Initialize(); }
void TearDown() override { delete MG_State::pGLContext; }
void TearDown() override {}
};
TEST_F(ProgramTest, Sanity) {