mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 16:58:56 +00:00
guard preference values provider against missing context
This commit is contained in:
parent
e5997b4fea
commit
6cc26bb52f
1 changed files with 3 additions and 0 deletions
|
@ -38,6 +38,9 @@ public interface IPreferenceValuesProvider {
|
|||
|
||||
@Override
|
||||
public IPreferenceValues getPreferenceValues(Resource context) {
|
||||
if (context == null) {
|
||||
return empty();
|
||||
}
|
||||
PreferenceValuesByLanguage valuesByLanguage = PreferenceValuesByLanguage.findInEmfObject(context.getResourceSet());
|
||||
if (valuesByLanguage == null)
|
||||
return empty();
|
||||
|
|
Loading…
Reference in a new issue