build identifier: 2.5.2.v20100202

npe when remove wrong chart y optional series from cube and want to select data cube

reproducible: always

steps to reproduce:
1.open attached chart buider
2.tick inherit data from container and remove wrong expression for y-optional series.
3.tick "use data from:"

expected result:no exception

actual result:npe

error log:
java.lang.nullpointerexception
at org.eclipse.birt.chart.ui.swt.wizard.data.basedatadefinitioncomponent.setqueryexpression(basedatadefinitioncomponent.java:1180)
at org.eclipse.birt.chart.ui.swt.wizard.data.basedatadefinitioncomponent.updatequery(basedatadefinitioncomponent.java:999)
at org.eclipse.birt.chart.ui.swt.wizard.data.yoptionaldatadefinitioncomponent.updatequery(yoptionaldatadefinitioncomponent.java:244)
at org.eclipse.birt.chart.ui.swt.wizard.data.basedatadefinitioncomponent.savequery(basedatadefinitioncomponent.java:779)
at org.eclipse.birt.chart.ui.swt.wizard.data.yoptionaldatadefinitioncomponent.savequery(yoptionaldatadefinitioncomponent.java:174)
at org.eclipse.birt.chart.ui.swt.wizard.data.basedatadefinitioncomponent.focuslost(basedatadefinitioncomponent.java:768)
at org.eclipse.swt.widgets.typedlistener.handleevent(typedlistener.java:137)
at org.eclipse.swt.widgets.eventtable.sendevent(eventtable.java:84)
at org.eclipse.swt.widgets.widget.sendevent(widget.java:1003)
at org.eclipse.swt.widgets.widget.sendevent(widget.java:1027)
at org.eclipse.swt.widgets.widget.sendevent(widget.java:1008)
at org.eclipse.swt.widgets.control.sendfocusevent(control.java:2583)
at org.eclipse.swt.widgets.widget.wmkillfocus(widget.java:1781)
at org.eclipse.swt.widgets.control.wm_killfocus(control.java:4289)
at org.eclipse.swt.widgets.control.windowproc(control.java:3979)
at org.eclipse.swt.widgets.text.windowproc(text.java:2170)
at org.eclipse.swt.widgets.display.windowproc(display.java:4632)
at org.eclipse.swt.internal.win32.os.callwindowprocw(native method)
at org.eclipse.swt.internal.win32.os.callwindowproc(os.java:2314)
at org.eclipse.swt.widgets.button.callwindowproc(button.java:338)
at org.eclipse.swt.widgets.widget.wmlbuttondown(widget.java:1853)
at org.eclipse.swt.widgets.control.wm_lbuttondown(control.java:4297)
at org.eclipse.swt.widgets.button.wm_lbuttondown(button.java:1197)
at org.eclipse.swt.widgets.control.windowproc(control.java:3981)
at org.eclipse.swt.widgets.display.windowproc(display.java:4632)
at org.eclipse.swt.internal.win32.os.dispatchmessagew(native method)
at org.eclipse.swt.internal.win32.os.dispatchmessage(os.java:2411)
at org.eclipse.swt.widgets.display.readanddispatch(display.java:3501)
at org.eclipse.jface.window.window.runeventloop(window.java:825)
at org.eclipse.jface.window.window.open(window.java:801)
at org.eclipse.birt.core.ui.frameworks.taskwizard.wizardbase.open(wizardbase.java:87)
at org.eclipse.birt.chart.ui.swt.wizard.chartwizard.open(chartwizard.java:234)
at org.eclipse.birt.chart.reportitem.ui.chartreportitembuilderimpl.open(chartreportitembuilderimpl.java:294)
at org.eclipse.birt.report.designer.internal.ui.extension.extendededitpart.performdirectedit(extendededitpart.java:185)
at org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.reportelementeditpart.performrequest(reportelementeditpart.java:150)
at org.eclipse.gef.tools.selecteditparttracker.performopen(selecteditparttracker.java:187)
at org.eclipse.gef.tools.selecteditparttracker.handledoubleclick(selecteditparttracker.java:131)
at org.eclipse.gef.tools.abstracttool.mousedoubleclick(abstracttool.java:955)
at org.eclipse.birt.report.designer.internal.ui.editors.schematic.tools.reportelementdragtracker.mousedoubleclick(reportelementdragtracker.java:125)
at org.eclipse.gef.tools.selectiontool.mousedoubleclick(selectiontool.java:501)
at org.eclipse.gef.editdomain.mousedoubleclick(editdomain.java:208)
at org.eclipse.gef.ui.parts.domaineventdispatcher.dispatchmousedoubleclicked(domaineventdispatcher.java:285)
at org.eclipse.draw2d.lightweightsystem$eventhandler.mousedoubleclick(lightweightsystem.java:508)
at org.eclipse.swt.widgets.typedlistener.handleevent(typedlistener.java:183)
at org.eclipse.swt.widgets.eventtable.sendevent(eventtable.java:84)
at org.eclipse.swt.widgets.widget.sendevent(widget.java:1003)
at org.eclipse.swt.widgets.display.rundeferredevents(display.java:3910)
at org.eclipse.swt.widgets.display.readanddispatch(display.java:3503)
at org.eclipse.ui.internal.workbench.runeventloop(workbench.java:2405)
at org.eclipse.ui.internal.workbench.runui(workbench.java:2369)
at org.eclipse.ui.internal.workbench.access$4(workbench.java:2221)
at org.eclipse.ui.internal.workbench$5.run(workbench.java:500)
at org.eclipse.core.databinding.observable.realm.runwithdefault(realm.java:332)
at org.eclipse.ui.internal.workbench.createandrunworkbench(workbench.java:493)
at org.eclipse.ui.platformui.createandrunworkbench(platformui.java:149)
at org.eclipse.ui.internal.ide.application.ideapplication.start(ideapplication.java:113)
at org.eclipse.equinox.internal.app.eclipseapphandle.run(eclipseapphandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.eclipseapplauncher.runapplication(eclipseapplauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.eclipseapplauncher.start(eclipseapplauncher.java:79)
at org.eclipse.core.runtime.adaptor.eclipsestarter.run(eclipsestarter.java:368)
at org.eclipse.core.runtime.adaptor.eclipsestarter.run(eclipsestarter.java:179)
at sun.reflect.nativemethodaccessorimpl.invoke0(native method)
at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39)
at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25)
at java.lang.reflect.method.invoke(method.java:597)
at org.eclipse.equinox.launcher.main.invokeframework(main.java:559)
at org.eclipse.equinox.launcher.main.basicrun(main.java:514)
at org.eclipse.equinox.launcher.main.run(main.java:1311)
duplicate
dup