Omaha #5513 Fix NPE when AlarmAlertDlg is opened the second time.

Change-Id: Iba0cfd1ed74d4ab045064abdf4768bd0fa3f1db4

Former-commit-id: 430701c960d301cfae54b65dc9c6a0187352a760
This commit is contained in:
Ron Anderson 2016-05-31 17:01:18 -05:00
parent 5b059253ce
commit dc55dde5d5

View file

@ -203,13 +203,14 @@ public class AlarmAlertDlg extends CaveSWTDialog {
* Sets the shell location.
*/
private void setLocation() {
int shellSizeX = getShell().getSize().x;
int shellSizeY = getShell().getSize().y;
Rectangle bounds = getParent().getMonitor().getBounds();
int locationX = bounds.x + bounds.width - shellSizeX;
int locationY = bounds.y + bounds.height - shellSizeY;
shell.setLocation(locationX, locationY);
return;
if (shell != null) {
int shellSizeX = getShell().getSize().x;
int shellSizeY = getShell().getSize().y;
Rectangle bounds = getParent().getMonitor().getBounds();
int locationX = bounds.x + bounds.width - shellSizeX;
int locationY = bounds.y + bounds.height - shellSizeY;
shell.setLocation(locationX, locationY);
}
}
@Override