diff options
Diffstat (limited to 'fpdfsdk/src/pdfwindow')
-rw-r--r-- | fpdfsdk/src/pdfwindow/PWL_ListBox.cpp | 19 | ||||
-rw-r--r-- | fpdfsdk/src/pdfwindow/PWL_Wnd.cpp | 2 |
2 files changed, 7 insertions, 14 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp index 0328ee55d6..48fb409b7b 100644 --- a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp @@ -90,13 +90,9 @@ CPWL_ListBox::CPWL_ListBox() : CPWL_ListBox::~CPWL_ListBox() { - IFX_List::DelList(m_pList); - - if (m_pListNotify) - { - delete m_pListNotify; - m_pListNotify = NULL; - } + IFX_List::DelList(m_pList); + delete m_pListNotify; + m_pListNotify = NULL; } CFX_ByteString CPWL_ListBox::GetClassName() const @@ -108,7 +104,7 @@ void CPWL_ListBox::OnCreated() { if (m_pList) { - if (m_pListNotify) delete m_pListNotify; + delete m_pListNotify; m_pList->SetFontMap(GetFontMap()); m_pList->SetNotify(m_pListNotify = new CPWL_List_Notify(this)); @@ -123,11 +119,8 @@ void CPWL_ListBox::OnCreated() void CPWL_ListBox::OnDestroy() { - if (m_pListNotify) - { - delete m_pListNotify; - m_pListNotify = NULL; - } + delete m_pListNotify; + m_pListNotify = NULL; } void CPWL_ListBox::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream) diff --git a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp index 8ee9967763..dcc6e409a4 100644 --- a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp @@ -71,7 +71,7 @@ CPWL_TimerHandler::CPWL_TimerHandler() : m_pTimer(NULL) CPWL_TimerHandler::~CPWL_TimerHandler() { - if (m_pTimer) delete m_pTimer; + delete m_pTimer; } void CPWL_TimerHandler::BeginTimer(int32_t nElapse) |