mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Avoid creating a fileloader during shutdown.
Some silliness I found while investigating using SuperLuminal.
This commit is contained in:
parent
d1e2b19ebb
commit
6de574104c
2 changed files with 11 additions and 3 deletions
|
@ -677,9 +677,13 @@ void GameInfoCache::Clear() {
|
|||
|
||||
void GameInfoCache::CancelAll() {
|
||||
for (auto info : info_) {
|
||||
auto fl = info.second->GetFileLoader();
|
||||
if (fl) {
|
||||
fl->Cancel();
|
||||
// GetFileLoader will create one if there isn't one already.
|
||||
// Avoid that by checking.
|
||||
if (info.second->HasFileLoader()) {
|
||||
auto fl = info.second->GetFileLoader();
|
||||
if (fl) {
|
||||
fl->Cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,6 +87,10 @@ public:
|
|||
bool DeleteAllSaveData();
|
||||
bool LoadFromPath(const Path &gamePath);
|
||||
|
||||
bool HasFileLoader() const {
|
||||
return fileLoader.get() != nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<FileLoader> GetFileLoader();
|
||||
void DisposeFileLoader();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue