Pārlūkot izejas kodu

搜索-添加判空处理避免崩溃

lvle 1 gadu atpakaļ
vecāks
revīzija
197420d2a6
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      PDF Office/ViewModels/ViewContentViewModel.cs

+ 1 - 1
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -2215,7 +2215,7 @@ namespace PDF_Master.ViewModels
 
         public void SearchTextFocus(SearchContent searchContent)
         {
-            if (string.IsNullOrEmpty(searchContent.SearchText.Text) == false)
+            if (searchContent!=null&&searchContent.SearchText!=null&& string.IsNullOrEmpty(searchContent.SearchText.Text) == false)
             {
                 searchContent.SearchText.Dispatcher.BeginInvoke(new Action(() =>
                 {