# HG changeset patch # User Santeri Piippo # Date 1382109143 -10800 # Node ID c3787dbd6315a667a7addba580fe5c2804116dab # Parent ee90c55dfeef9e78fc129a21782d3a797e54005a fixed a small memory leak diff -r ee90c55dfeef -r c3787dbd6315 src/gldraw.cpp --- 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();