Remove unnecessary check for null notebook page

A non-empty notebook always has a non-null current page.
This commit is contained in:
Vadim Zeitlin
2017-03-31 17:13:44 +02:00
parent 9eb62000f9
commit 3745f2c771

View File

@@ -175,11 +175,7 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
void MyFrame::FileSavePicture(wxCommandEvent& WXUNUSED(event)) void MyFrame::FileSavePicture(wxCommandEvent& WXUNUSED(event))
{ {
#if wxUSE_FILEDLG #if wxUSE_FILEDLG
MyPage *page = (MyPage *) m_notebook->GetCurrentPage(); MyPage * const page = (MyPage *) m_notebook->GetCurrentPage();
if (page == NULL)
{
return;
}
wxFileDialog dialog(this, wxT("Save Picture as"), wxEmptyString, wxFileDialog dialog(this, wxT("Save Picture as"), wxEmptyString,
m_notebook->GetPageText(m_notebook->GetSelection()), m_notebook->GetPageText(m_notebook->GetSelection()),