Ethosa 3 anos atrás
pai
commit
7d3f74aedf
2 arquivos alterados com 1 adições e 1 exclusões
  1. 1 0
      src/nodesnim/core/font.nim
  2. 0 1
      src/nodesnim/core/image.nim

+ 1 - 0
src/nodesnim/core/font.nim

@@ -333,6 +333,7 @@ proc render*(text: StyleText, size: Vector2Obj, align: AnchorObj) =
 
     # free memory
     surface.freeSurface()
+    surface = nil
   text.rendered = true
 
 proc renderTo*(text: StyleText, pos, size: Vector2Obj, align: AnchorObj) =

+ 0 - 1
src/nodesnim/core/image.nim

@@ -41,7 +41,6 @@ proc load*(file: string, x, y: var float, mode: Glenum = GL_RGB): Gluint =
 
   # free memory
   surface.freeSurface()
-  surface = nil
 
   textureid