Update Font.cpp
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m33s
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m33s
fix memleak
This commit is contained in:
@@ -23,9 +23,8 @@ namespace JGL {
|
||||
using namespace J3ML;
|
||||
Vector2 wS;
|
||||
|
||||
bool Update(const Vector2& window_size) {
|
||||
void Update(const Vector2& window_size) {
|
||||
wS = window_size;
|
||||
return JGL::InitTextEngine();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -49,6 +49,9 @@ namespace JGL::Detail
|
||||
}
|
||||
|
||||
bool InitTextEngine() {
|
||||
if (ft != nullptr)
|
||||
throw std::runtime_error("Error::FREETYPE: FT_Library was initialized but is already initialized.");
|
||||
|
||||
if (FT_Init_FreeType(&ft))
|
||||
return true;
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user