Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2599)

Unified Diff: sdk/lib/collection/splay_tree.dart

Issue 274563008: Fix bug in SplayTreeSet when removeWhere removes all elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/corelib/splay_tree_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/collection/splay_tree.dart
diff --git a/sdk/lib/collection/splay_tree.dart b/sdk/lib/collection/splay_tree.dart
index 4674f8c27c3bee32872ce8247044d723601088ce..8e2f5930eff58f4928cc88bcafc1996a6ecf6151 100644
--- a/sdk/lib/collection/splay_tree.dart
+++ b/sdk/lib/collection/splay_tree.dart
@@ -523,6 +523,7 @@ abstract class _SplayTreeIterator<T> implements Iterator<T> {
_SplayTreeIterator.startAt(_SplayTree tree, var startKey)
: _tree = tree,
_modificationCount = tree._modificationCount {
+ if (tree._root == null) return;
int compare = tree._splay(startKey);
_splayCount = tree._splayCount;
if (compare < 0) {
« no previous file with comments | « no previous file | tests/corelib/splay_tree_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698