Loop on the CAM until the CAM is non-null to prevent a situation where the null CAM is used to call getRegisteredApp, apparenly due to a race condition somewhere

This commit is contained in:
idk
2022-02-11 13:10:50 -05:00
parent 8200d65eb5
commit 36b0618b8d

View File

@ -73,7 +73,12 @@ public class WinLauncher {
}
// then wait for the update manager
ClientAppManager cam = ctx.clientAppManager();
ClientAppManager cam;
while ((cam = ctx.clientAppManager()) == null) {
sleep(1000);
}
UpdateManager um;
while ((um = (UpdateManager) cam.getRegisteredApp(UpdateManager.APP_NAME)) == null) {
sleep(1000);