From 3745f2c7715c24d2ca05dcb5a1e3d71c9f4bb49b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 31 Mar 2017 17:13:44 +0200 Subject: [PATCH] Remove unnecessary check for null notebook page A non-empty notebook always has a non-null current page. --- samples/svg/svgtest.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/samples/svg/svgtest.cpp b/samples/svg/svgtest.cpp index 4563474ab1..c9abc61363 100644 --- a/samples/svg/svgtest.cpp +++ b/samples/svg/svgtest.cpp @@ -175,11 +175,7 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void MyFrame::FileSavePicture(wxCommandEvent& WXUNUSED(event)) { #if wxUSE_FILEDLG - MyPage *page = (MyPage *) m_notebook->GetCurrentPage(); - if (page == NULL) - { - return; - } + MyPage * const page = (MyPage *) m_notebook->GetCurrentPage(); wxFileDialog dialog(this, wxT("Save Picture as"), wxEmptyString, m_notebook->GetPageText(m_notebook->GetSelection()),