src/gldraw.cpp

changeset 511
c3787dbd6315
parent 510
ee90c55dfeef
child 512
adab82ab13a5
--- a/src/gldraw.cpp	Fri Oct 18 17:57:42 2013 +0300
+++ b/src/gldraw.cpp	Fri Oct 18 18:12:23 2013 +0300
@@ -1764,7 +1764,6 @@
 	bool firstrun = true;
 	const uint32 white = 0xFFFFFFFF;
 	bool inward = true;
-	int run = 0;
 	const int w = m_width, h = m_height;
 
 	glClearColor (1.0, 1.0, 1.0, 1.0);
@@ -1800,6 +1799,8 @@
 			if (imgdata[i * w] != white || imgdata[ (i * w) + (w - 1)] != white)
 				filled = true;
 
+		delete[] cap;
+
 		if (firstrun)
 		{	// If this is the first run, we don't know enough to determine
 			// whether the zoom was to fit, so we mark in our knowledge so
@@ -1823,9 +1824,7 @@
 			inward = !filled;
 		}
 
-		delete[] cap;
 		lastfilled = filled;
-		++run;
 	}
 
 	setBackground();

mercurial