OSDN Git Service

MainFrm.cpp: Fix crash when changing the font of DirView 2.14.0+-jp-132
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 9 Apr 2017 06:54:56 +0000 (15:54 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 9 Apr 2017 06:54:56 +0000 (15:54 +0900)
Src/MainFrm.cpp

index 27b0169..d8f162d 100644 (file)
@@ -1045,8 +1045,14 @@ void CMainFrame::UpdateFont(FRAMETYPE frame)
        if (frame == FRAME_FOLDER)
        {
                for (auto pDoc : GetAllDirDocs())
+               {
                        if (pDoc)
-                               pDoc->GetMainView()->SetFont(m_lfDir);
+                       {
+                               CDirView *pView = pDoc->GetMainView();
+                               if (pView)
+                                       pView->SetFont(m_lfDir);
+                       }
+               }
        }
        else
        {