Skip to content

Commit

Permalink
Fix NPE caused by fix for Grid resizing with split panel (#18370)
Browse files Browse the repository at this point in the history
Change-Id: I0dfe71115db9f510e71e22ecfeffcd34fe5bd304
  • Loading branch information
Teemu Suo-Anttila committed Jul 8, 2015
1 parent 5220dad commit ce757b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/src/com/vaadin/client/ui/VSplitPanelHorizontal.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public VSplitPanelHorizontal() {

@Override
protected void startResize() {
if (isWidgetFullWidth(getFirstWidget())) {
if (getFirstWidget() != null && isWidgetFullWidth(getFirstWidget())) {
getFirstContainer().getStyle().setOverflow(Overflow.HIDDEN);
}

if (isWidgetFullWidth(getSecondWidget())) {
if (getSecondWidget() != null && isWidgetFullWidth(getSecondWidget())) {
getSecondContainer().getStyle().setOverflow(Overflow.HIDDEN);
}
}
Expand Down
4 changes: 2 additions & 2 deletions client/src/com/vaadin/client/ui/VSplitPanelVertical.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public VSplitPanelVertical() {

@Override
protected void startResize() {
if (isWidgetFullHeight(getFirstWidget())) {
if (getFirstWidget() != null && isWidgetFullHeight(getFirstWidget())) {
getFirstContainer().getStyle().setOverflow(Overflow.HIDDEN);
}

if (isWidgetFullHeight(getSecondWidget())) {
if (getSecondWidget() != null && isWidgetFullHeight(getSecondWidget())) {
getSecondContainer().getStyle().setOverflow(Overflow.HIDDEN);
}
}
Expand Down

0 comments on commit ce757b6

Please sign in to comment.