mirror of
https://github.com/ZuneDev/ZuneShell.dll.git
synced 2026-07-27 13:11:51 -07:00
Converted to lock blocks
This commit is contained in:
@@ -17,9 +17,8 @@ namespace Microsoft.Zune.User
|
||||
{
|
||||
if (sm_instance == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
Monitor.Enter(sm_lock);
|
||||
lock (sm_lock)
|
||||
{
|
||||
if (sm_instance == null)
|
||||
{
|
||||
UserManager userManager = new UserManager();
|
||||
@@ -27,10 +26,6 @@ namespace Microsoft.Zune.User
|
||||
sm_instance = userManager;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(sm_lock);
|
||||
}
|
||||
}
|
||||
return sm_instance;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user