summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormianrui2012-04-24 22:52:37 (EDT)
committer mwu2012-04-24 22:52:37 (EDT)
commit214bad6468822a0460af0fc66f1bdcfb4adc150f (patch)
treef5ebd3533e343a8e1b280647f9f93a3a992c00b4
parentbea4c377e4bcfd6c07168251e80ccba8633bad5e (diff)
downloadorg.eclipse.birt-214bad6468822a0460af0fc66f1bdcfb4adc150f.zip
org.eclipse.birt-214bad6468822a0460af0fc66f1bdcfb4adc150f.tar.gz
org.eclipse.birt-214bad6468822a0460af0fc66f1bdcfb4adc150f.tar.bz2
TED – Issue 49054 reinforcement,a NullPointerException will appear, in
some cases.
-rw-r--r--data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/editors/SQLDataSetEditorPage.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/editors/SQLDataSetEditorPage.java b/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/editors/SQLDataSetEditorPage.java
index c697600..92cc2d9 100644
--- a/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/editors/SQLDataSetEditorPage.java
+++ b/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/editors/SQLDataSetEditorPage.java
@@ -424,17 +424,21 @@ public class SQLDataSetEditorPage extends DataSetWizardPage
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 )