Skip to content

Commit

Permalink
TED – Issue 49054 reinforcement,a NullPointerException will appear, in
Browse files Browse the repository at this point in the history
some cases.
  • Loading branch information
mianrui authored and mwu committed Apr 25, 2012
1 parent bea4c37 commit 214bad6
Showing 1 changed file with 15 additions and 11 deletions.
Expand Up @@ -424,17 +424,21 @@ public void controlResized( ControlEvent e )

private void computeSize( )
{
availableDbObjectsTree.setBounds( availableDbObjectsTree.getBounds( ).x,
availableDbObjectsTree.getBounds( ).y,
this.getShell( ).getSize( ).x / 3,
this.getShell( ).getSize( ).y / 4 );
sComposite.setMinSize( max( this.getShell( ).getSize( ).x / 3 - 30,
DB_OBJECT_TREE_WIDTH_MIN ),
max( this.getShell( ).getSize( ).y / 4,
DB_OBJECT_TREE_HEIGHT_MIN )
+ selectTableGroup.getBounds( ).height
+ sqlOptionGroup.getBounds( ).height + 30 );
tablescomposite.layout( );
if ( this.getShell( ) != null )
{
availableDbObjectsTree.setBounds( availableDbObjectsTree.getBounds( ).x,
availableDbObjectsTree.getBounds( ).y,
this.getShell( ).getSize( ).x / 3,
this.getShell( ).getSize( ).y / 4 );
sComposite.setMinSize( max( this.getShell( ).getSize( ).x / 3 - 30,
DB_OBJECT_TREE_WIDTH_MIN ),
max( this.getShell( ).getSize( ).y / 4,
DB_OBJECT_TREE_HEIGHT_MIN )
+ selectTableGroup.getBounds( ).height
+ sqlOptionGroup.getBounds( ).height + 30 );
tablescomposite.layout( );
}

}

private int max( double d, double b )
Expand Down

0 comments on commit 214bad6

Please sign in to comment.