mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:27:39 +00:00
Don't crash when reporting an error
R=johnniwinther@google.com Review URL: https://codereview.chromium.org//1157433014
This commit is contained in:
parent
c60c313f59
commit
e20001a07f
|
@ -1947,6 +1947,10 @@ abstract class Compiler implements DiagnosticListener {
|
|||
if (element == null) {
|
||||
element = currentElement;
|
||||
}
|
||||
if (element == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (element.sourcePosition != null) {
|
||||
return element.sourcePosition;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue