diff options
| author | kat <kat@vector35.com> | 2024-11-05 16:05:47 -0500 |
|---|---|---|
| committer | kat <kat@vector35.com> | 2024-11-05 16:06:16 -0500 |
| commit | aec66022d5b940bf6f489947f72ac52e0fc7cac4 (patch) | |
| tree | 49f4493ff260bd9e7bfc6e07749a4b3b947d4dae /view/sharedcache/core/DSCView.cpp | |
| parent | 7176267d5e769a0b11f9bf8cf9b2f4cbcce9c569 (diff) | |
[SharedCache] Fix .bndb save/load outside of projects
Diffstat (limited to 'view/sharedcache/core/DSCView.cpp')
| -rw-r--r-- | view/sharedcache/core/DSCView.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/view/sharedcache/core/DSCView.cpp b/view/sharedcache/core/DSCView.cpp index 3eb40b7e..06a73a69 100644 --- a/view/sharedcache/core/DSCView.cpp +++ b/view/sharedcache/core/DSCView.cpp @@ -629,6 +629,8 @@ bool DSCView::Init() ss.str(data); rapidjson::Document result(rapidjson::kObjectType); + result.Parse(data.c_str()); + if (result.HasMember("metadataVersion")) { if (result["metadataVersion"].GetInt() != METADATA_VERSION) @@ -643,8 +645,6 @@ bool DSCView::Init() LogError("Shared cache metadata version not found"); return false; } - - result.Parse(data.c_str()); for (auto& imgV : result["regionsMappedIntoMemory"].GetArray()) { SharedCacheCore::MemoryRegion region; |
