Remove unnecessary check for null notebook page
A non-empty notebook always has a non-null current page.
This commit is contained in:
@@ -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()),
|
||||||
|
Reference in New Issue
Block a user