diff src/scripts/graphics.lua @ 1391:a742f6edaf92

Fixed filedata not being cleaned up when love.image.newImageData(filepath) fails
author Alex Szpakowski <slime73@gmail.com>
date Tue, 19 Mar 2013 09:01:15 -0300
parents 6f1ac9fc80da
children 5842a06169ff fa3eabb3602a
line wrap: on
line diff
--- a/src/scripts/graphics.lua	Mon Mar 18 22:55:41 2013 -0300
+++ b/src/scripts/graphics.lua	Tue Mar 19 09:01:15 2013 -0300
@@ -1361,8 +1361,6 @@
 	end
 
 	function love.graphics._shaderCodeToGLSL(vertexcode, pixelcode)
-		local vertexarg, pixelarg = vertexcode, pixelcode
-
 		if vertexcode then
 			local s = vertexcode:gsub("\r\n\t", " ")
 			s = s:gsub("(%w+)(%s+)%(", "%1(")
@@ -1373,7 +1371,6 @@
 				vertexcode = nil -- first argument doesn't contain vertex shader code
 			end
 		end
-
 		if pixelcode then
 			local s = pixelcode:gsub("\r\n\t", " ")
 			s = s:gsub("(%w+)(%s+)%(", "%1(")
@@ -1388,7 +1385,6 @@
 		if vertexcode then
 			vertexcode = createVertexCode(vertexcode)
 		end
-
 		if pixelcode then
 			pixelcode = createPixelCode(pixelcode)
 		end