Skip to content

Commit

Permalink
MainFrm.cpp: Fix crash when changing the font of DirView
Browse files Browse the repository at this point in the history
  • Loading branch information
sdottaka committed Apr 9, 2017
1 parent 72ff617 commit ebd1bf3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Src/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit ebd1bf3

Please sign in to comment.