Omaha #5513 Fix NPE when AlarmAlertDlg is opened the second time.
Change-Id: Iba0cfd1ed74d4ab045064abdf4768bd0fa3f1db4 Former-commit-id: 430701c960d301cfae54b65dc9c6a0187352a760
This commit is contained in:
parent
5b059253ce
commit
dc55dde5d5
1 changed files with 8 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue