![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | Request to range-check ColorPaletteIndex | ||
|---|---|---|---|
| Product: | .NET TeeChart | Reporter: | christopher ireland <chris> |
| Component: | Series | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | ||
| Priority: | --- | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
|
Description
christopher ireland
2023-04-17 05:45:34 EDT
diff --git a/TeeChart/Editors/Gallery/ChartGallery.cs b/TeeChart/Editors/Gallery/ChartGallery.cs
index 6c4a254b..8dbb5af0 100644
--- a/TeeChart/Editors/Gallery/ChartGallery.cs
+++ b/TeeChart/Editors/Gallery/ChartGallery.cs
@@ -528,7 +528,7 @@ namespace Steema.TeeChart.Editors
gallery.Parent = tab.SelectedTab;
gallery.Dock = DockStyle.Fill;
- if (GalleryPanel.ColorPaletteIndex > -1)
+ if (GalleryPanel.ColorPaletteIndex > -1 && GalleryPanel.ColorPaletteIndex < Themes.Theme.ColorPalettes.Count)
cbGalleryPalette.SelectedIndex = GalleryPanel.ColorPaletteIndex;
else
cbGalleryPalette.SelectedIndex = 13;
|