Merge pull request #220 from GreatFireWall/master
Fix ArgumentNullException issue.
This commit is contained in:
Коммит
6200cab9eb
|
@ -272,10 +272,15 @@ namespace ICSharpCode.AvalonEdit.Search
|
|||
{
|
||||
if (searchTextBox == null)
|
||||
return;
|
||||
|
||||
var be = searchTextBox.GetBindingExpression(TextBox.TextProperty);
|
||||
|
||||
try {
|
||||
Validation.ClearInvalid(be);
|
||||
if (be != null)
|
||||
Validation.ClearInvalid(be);
|
||||
|
||||
UpdateSearch();
|
||||
|
||||
} catch (SearchPatternException ex) {
|
||||
var ve = new ValidationError(be.ParentBinding.ValidationRules[0], be, ex.Message, ex);
|
||||
Validation.MarkInvalid(be, ve);
|
||||
|
|
Загрузка…
Ссылка в новой задаче