Skip to content

Commit

Permalink
Merge pull request rstudio#5236 from rstudio/bugfix/prefs-layer-crash
Browse files Browse the repository at this point in the history
Fix crash when reloading preferences
  • Loading branch information
jmcphers authored Aug 14, 2019
2 parents 46c6915 + 04f38eb commit f7bd49e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cpp/session/prefs/UserPrefsLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ void UserPrefsLayer::onPrefsFileChanged()
}

// Make a copy of the prefs prior to reloading, so we can diff against the old copy
const json::Object old = cache_->clone().get_obj();
const json::Value oldVal = cache_->clone();
const json::Object old = oldVal.get_obj();

// Reload the prefs from the file
Error error = loadPrefsFromFile(prefsFile_);
Expand Down

0 comments on commit f7bd49e

Please sign in to comment.