소스 검색

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

ZhouJieSheng 1 년 전
부모
커밋
b608bc25e1
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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);