File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,11 @@ impl Config {
177
177
178
178
pub fn update ( & mut self , json : serde_json:: Value ) {
179
179
log:: info!( "Config::update({:#})" , json) ;
180
+
181
+ if json. is_null ( ) {
182
+ return ;
183
+ }
184
+
180
185
let data = ConfigData :: from_json ( json) ;
181
186
182
187
self . with_sysroot = data. withSysroot ;
Original file line number Diff line number Diff line change @@ -468,6 +468,8 @@ impl GlobalState {
468
468
}
469
469
( None , Some ( mut configs) ) => {
470
470
if let Some ( json) = configs. get_mut ( 0 ) {
471
+ // Note that json can be null according to the spec if the client can't
472
+ // provide a configuration. This is handled in Config::update below.
471
473
let mut config = this. config . clone ( ) ;
472
474
config. update ( json. take ( ) ) ;
473
475
this. update_configuration ( config) ;
You can’t perform that action at this time.
0 commit comments