ソースを参照

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);