File tree Expand file tree Collapse file tree
chartLib/src/main/kotlin/info/appdev/charting/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,6 +192,7 @@ class Legend() : ComponentBase() {
192192 val formToTextSpace = formToTextSpace.convertDpToPixel()
193193
194194 for (entry in this .entries) {
195+ if (entry == null ) continue
195196 val formSize = (if (entry.formSize.isNaN())
196197 this .formSize
197198 else
@@ -365,6 +366,7 @@ class Legend() : ComponentBase() {
365366 var i = 0
366367 while (i < entryCount) {
367368 val e = entries[i]
369+ if (e == null ) { i++ ; continue }
368370 val drawingForm = e.form != LegendForm .NONE
369371 val formSize = if (e.formSize.isNaN())
370372 defaultFormSize
@@ -425,6 +427,7 @@ class Legend() : ComponentBase() {
425427 var i = 0
426428 while (i < entryCount) {
427429 val legendEntry = entries[i]
430+ if (legendEntry == null ) { i++ ; continue }
428431 val drawingForm = legendEntry.form != LegendForm .NONE
429432 val formSize = if (legendEntry.formSize.isNaN())
430433 defaultFormSize
You can’t perform that action at this time.
0 commit comments