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

Unified Diff: pkg/watcher/lib/src/path_set.dart

Issue 428493004: Add check to watcher, to avoid null-error if unknown path is removed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/watcher/lib/src/path_set.dart
diff --git a/pkg/watcher/lib/src/path_set.dart b/pkg/watcher/lib/src/path_set.dart
index 01d4208f4f79ab86661ec87348afdfcfc41ed9b8..e9f7d32d25c294ea697cb702752e63ac21112584 100644
--- a/pkg/watcher/lib/src/path_set.dart
+++ b/pkg/watcher/lib/src/path_set.dart
@@ -71,7 +71,7 @@ class PathSet {
// the next level.
var part = parts.removeFirst();
var entry = dir[part];
- if (entry.isEmpty) return new Set();
+ if (entry == null || entry.isEmpty) return new Set();
partialPath = p.join(partialPath, part);
var paths = recurse(entry, partialPath);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698