Pārlūkot izejas kodu

BOTA- 恢复BOTA选项时,补充判空逻辑

ZhouJieSheng 1 gadu atpakaļ
vecāks
revīzija
b608bc25e1
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      PDF Office/ViewModels/BOTA/BOTAContentViewModel.cs

+ 2 - 1
PDF Office/ViewModels/BOTA/BOTAContentViewModel.cs

@@ -219,7 +219,8 @@ namespace PDF_Master.ViewModels.BOTA
             if(Settings.Default.AppProperties.InitialVIew.RememberBOTA)
             {
                 var info = SettingHelper.GetFileInfo(pdfview.Document.FilePath);
-                if (info != null)
+                //避免新文档因打开文件没有selectedTab信息导致崩溃
+                if (info != null&!string.IsNullOrEmpty(info.BOTASelectedTab))
                 {
                     SelectedIndex = info.BOTASelectedInex;
                     EnterSelectedBar(info.BOTASelectedTab);