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

Unified Diff: pkg/analysis_server/lib/src/services/index/store/split_store.dart

Issue 823223003: Fix for NPE in the index store. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 | pkg/analysis_server/test/services/index/store/split_store_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/index/store/split_store.dart
diff --git a/pkg/analysis_server/lib/src/services/index/store/split_store.dart b/pkg/analysis_server/lib/src/services/index/store/split_store.dart
index e816fbb4caba57a59ed671679d182a9a23cb7004..d16d29a5b998cddab709f69030e8589069437060 100644
--- a/pkg/analysis_server/lib/src/services/index/store/split_store.dart
+++ b/pkg/analysis_server/lib/src/services/index/store/split_store.dart
@@ -684,7 +684,10 @@ class SplitIndexStore implements IndexStore {
@override
void recordRelationship(Element element, Relationship relationship,
Location location) {
- if (element == null || location == null) {
+ if (element == null || element.location == null) {
+ return;
+ }
+ if (location == null) {
return;
}
// special support for UniverseElement
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/index/store/split_store_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698