mirror of
https://github.com/ppy/osu
synced 2024-12-28 09:52:56 +00:00
Fix potential nullref throw on failed startup
This commit is contained in:
parent
b399f910e4
commit
edb1230111
@ -162,9 +162,12 @@ namespace osu.Game.Database
|
||||
}
|
||||
|
||||
public void FlushConnections()
|
||||
{
|
||||
if (threadContexts != null)
|
||||
{
|
||||
foreach (var context in threadContexts.Values)
|
||||
context.Dispose();
|
||||
}
|
||||
|
||||
recycleThreadContexts();
|
||||
}
|
||||
|
@ -527,7 +527,7 @@ namespace osu.Game
|
||||
BeatmapManager?.Dispose();
|
||||
LocalConfig?.Dispose();
|
||||
|
||||
contextFactory.FlushConnections();
|
||||
contextFactory?.FlushConnections();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user