Ethosa hace 3 años
padre
commit
7d3f74aedf
Se han modificado 2 ficheros con 1 adiciones y 1 borrados
  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