Handle MyStepRTB Dispose

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

No files matched your search

+5 -2
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)
{