X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/61ad6c12c81dd37c54797f5b507cdb677211f49a..555cf8e7b36faa768e40d09665781c468424a91c:/src/btree.cpp diff --git a/src/btree.cpp b/src/btree.cpp index 26224a5..e78a91e 100644 --- a/src/btree.cpp +++ b/src/btree.cpp @@ -1181,9 +1181,9 @@ uchar *BTree::NewBlock (uint &num) BTreeNodeHeader nh; std::list::iterator it; - it = deleted_nodes.begin (); - if (it != deleted_nodes.end ()) { + if (deleted_nodes.size ()) { + it = deleted_nodes.begin (); num = *it; deleted_nodes.erase (it); } else {