2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

chartingfrontend: fixed nullpointer when loading saved db-chart

git-svn-id: https://svn.fhem.de/fhem/trunk@4532 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
johannnes 2014-01-02 17:57:37 +00:00
parent 49a63b1356
commit 58250069f8
2 changed files with 4 additions and 3 deletions

View File

@ -279,7 +279,7 @@ UPD 2013-12-26_08:39:37 10257 www/frontend/app/view/TableDataGridPanel.js
UPD 2013-12-29_01:56:25 64890 www/frontend/app/view/LineChartPanel.js
UPD 2013-12-27_01:39:11 9980 www/frontend/app/view/Viewport.js
UPD 2014-01-02_02:26:30 19171 www/frontend/app/controller/MainController.js
UPD 2014-01-02_01:53:01 113053 www/frontend/app/controller/ChartController.js
UPD 2014-01-02_06:54:06 113093 www/frontend/app/controller/ChartController.js
UPD 2013-06-30_11:46:54 5415 www/frontend/app/controller/TableDataController.js
UPD 2013-04-01_07:04:35 202 www/frontend/app/model/ReadingsModel.js
UPD 2013-04-01_07:04:36 338 www/frontend/app/model/SavedChartsModel.js

View File

@ -438,7 +438,8 @@ Ext.define('FHEM.controller.ChartController', {
Ext.each(yaxes, function(y) {
var device = devices[i].getValue(),
yaxis = yaxes[i].getValue(),
yaxisindex = yaxes[i].getStore().findRecord("READING", yaxes[i].getValue()).raw.INDEX,
yaxisrec = yaxes[i].getStore().findRecord("READING", yaxes[i].getValue()),
yaxisindex = yaxisrec ? yaxisrec.raw.INDEX : 0,
styleConfig = rowFieldSets[i].styleConfig,
yaxisstatistics = yaxesstatistics[i].getValue(),
axisside = axissideradio[i].getChecked()[0].getSubmitValue(),
@ -446,7 +447,7 @@ Ext.define('FHEM.controller.ChartController', {
if(yaxis === "" || yaxis === null) {
yaxis = yaxes[i].getRawValue();
}
me.populateAxis(i, yaxes.length, device, yaxis, yaxisindex, styleConfig, axisside, yaxisstatistics, dbstarttime, dbendtime, logtype);
i++;
});