Fix crash opening up GS CBuffer window from pipeline state

* Also added an exception that throws at control creation time (much
  easier to spot) if this property is invalid.
This commit is contained in:
baldurk
2015-03-02 08:38:33 +00:00
parent 28922673cb
commit 731a7f3797
2 changed files with 8 additions and 2 deletions
@@ -128,7 +128,13 @@ namespace TreelistView
public int TreeColumn
{
get { return m_treeColumn; }
set { m_treeColumn = value; }
set
{
m_treeColumn = value;
if(value >= m_columns.Count)
throw new ArgumentOutOfRangeException("Tree column index invalid");
}
}
[Category("Behavior")]
@@ -2385,7 +2385,7 @@
this.gsCBuffers.Size = new System.Drawing.Size(566, 113);
this.gsCBuffers.TabIndex = 11;
this.gsCBuffers.Text = "Samplers";
this.gsCBuffers.TreeColumn = 5;
this.gsCBuffers.TreeColumn = 4;
this.gsCBuffers.ViewOptions.Indent = 0;
this.gsCBuffers.ViewOptions.ShowLine = false;
this.gsCBuffers.ViewOptions.ShowPlusMinus = false;