X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/61ad6c12c81dd37c54797f5b507cdb677211f49a..58866104a92791fdba206b3042be2c2b181a1e81:/src/btree.cpp?ds=inline 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 {