Handle MyStepRTB Dispose

Fixed a NullReference Bug
This commit is contained in:
Rich
2011-02-11 21:14:08 +00:00
parent 0ad442ae19
commit 2876ad911a
2 changed files with 13 additions and 2 deletions

View File

@@ -215,8 +215,11 @@ namespace Volian.Controls.Library
private string _OrigRtf; // used to store original rtf to allow for 'escape' key restore
void MyFlexGrid_SelChange(object sender, EventArgs e)
{
if (MyFlexGrid.Selection.IsSingleCell && MyFlexGrid.Row >= 0 && MyFlexGrid.Col >= 0)
_OrigRtf = MyFlexGrid[MyFlexGrid.Row, MyFlexGrid.Col].ToString();
if (MyFlexGrid.Selection.IsSingleCell && MyFlexGrid.Row >= 0 && MyFlexGrid.Col >= 0)
{
object obj = MyFlexGrid[MyFlexGrid.Row, MyFlexGrid.Col];
_OrigRtf = obj == null ? string.Empty : obj.ToString();
}
}
void MyStepRTB_KeyDown(object sender, KeyEventArgs e)
{