Fix refreshing PatchScreen when fileList has not yet been loaded

Although PatchScreen and PatchTable typically guard against using a
not yet loaded PatchTable, refreshing a PatchScreen and the subsequent
moving of the pointer lacked such guards. Thereby, a race condition
was introduced that lead to issue 1749.
We now added guards in both PatchScreen, and PatchTable.

Bug: issue 1749
Change-Id: I03ee3e80c198373ebecc50b1135b9c542d8ecfe7
(cherry picked from commit da5ceb4c9c73306b90be4349a4e7e106ab78e676)
This commit is contained in:
Christian Aistleitner
2013-05-16 13:54:25 +02:00
committed by Shawn Pearce
parent 8ea0c8b12b
commit 0d1ba95185
2 changed files with 4 additions and 2 deletions

View File

@@ -361,7 +361,7 @@ public abstract class PatchScreen extends Screen implements
lastScript = null;
settingsPanel.setEnabled(false);
reviewedPanels.populate(patchKey, fileList, patchIndex, getPatchScreenType());
if (isFirst && fileList != null) {
if (isFirst && fileList != null && fileList.isLoaded()) {
fileList.movePointerTo(patchKey);
}
PatchUtil.DETAIL_SVC.patchScript(patchKey, idSideA, idSideB, //