]> git.mxchange.org Git - flightgear.git/commitdiff
Properly drop empty tiles from tile cache.
authorThorstenB <brehmt@gmail.com>
Wed, 28 Mar 2012 21:03:13 +0000 (23:03 +0200)
committerThorstenB <brehmt@gmail.com>
Wed, 28 Mar 2012 21:03:13 +0000 (23:03 +0200)
Tiles which expired before being loaded could clog the tile cache.

src/Scenery/tilecache.cxx

index ffe62a7444e06abb71f54b03a929de2ab9a19245..172b604ff5f662dcd6b90cbf3fb18fed8f4bc067 100644 (file)
@@ -100,6 +100,7 @@ long TileCache::get_drop_tile() {
                  * Allow a 1 second timeout since an empty tiles may just be loaded...
                  */
                 SG_LOG( SG_TERRAIN, SG_DEBUG, "    dropping an unused and empty tile");
+                min_index = index;
                 break;
             }
             if (( e->get_time_expired() < min_time )||