Преглед на файлове

free the font texture on shutdown

Jeffery Myers преди 1 година
родител
ревизия
0e4bf66eda
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      rlImGui.cpp

+ 3 - 1
rlImGui.cpp

@@ -617,7 +617,9 @@ void ImGui_ImplRaylib_Shutdown()
     Texture2D* fontTexture = (Texture2D*)io.Fonts->TexID;
 
     if (fontTexture && fontTexture->id != 0)
-	UnloadTexture(*fontTexture);
+	    UnloadTexture(*fontTexture);
+
+    MemFree(fontTexture);
 
     io.Fonts->TexID = 0;
 }