Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: fpdfsdk/src/pdfwindow/PWL_Wnd.cpp

Issue 1192743004: Cleanup: Do not check pointers before deleting them. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/pdfwindow/PWL_ListBox.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../include/pdfwindow/PDFWindow.h" 7 #include "../../include/pdfwindow/PDFWindow.h"
8 #include "../../include/pdfwindow/PWL_Wnd.h" 8 #include "../../include/pdfwindow/PWL_Wnd.h"
9 #include "../../include/pdfwindow/PWL_Utils.h" 9 #include "../../include/pdfwindow/PWL_Utils.h"
10 #include "../../include/pdfwindow/PWL_ScrollBar.h" 10 #include "../../include/pdfwindow/PWL_ScrollBar.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 /* -------------------------- CPWL_TimerHandler -------------------------- */ 66 /* -------------------------- CPWL_TimerHandler -------------------------- */
67 67
68 CPWL_TimerHandler::CPWL_TimerHandler() : m_pTimer(NULL) 68 CPWL_TimerHandler::CPWL_TimerHandler() : m_pTimer(NULL)
69 { 69 {
70 } 70 }
71 71
72 CPWL_TimerHandler::~CPWL_TimerHandler() 72 CPWL_TimerHandler::~CPWL_TimerHandler()
73 { 73 {
74 » if (m_pTimer) delete m_pTimer; 74 delete m_pTimer;
75 } 75 }
76 76
77 void CPWL_TimerHandler::BeginTimer(int32_t nElapse) 77 void CPWL_TimerHandler::BeginTimer(int32_t nElapse)
78 { 78 {
79 if (!m_pTimer) 79 if (!m_pTimer)
80 m_pTimer = new CPWL_Timer(this, GetSystemHandler()); 80 m_pTimer = new CPWL_Timer(this, GetSystemHandler());
81 81
82 if (m_pTimer) 82 if (m_pTimer)
83 m_pTimer->SetPWLTimer(nElapse); 83 m_pTimer->SetPWLTimer(nElapse);
84 } 84 }
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 FX_BOOL CPWL_Wnd::IsINSERTpressed(FX_DWORD nFlag) const 1299 FX_BOOL CPWL_Wnd::IsINSERTpressed(FX_DWORD nFlag) const
1300 { 1300 {
1301 if (IFX_SystemHandler* pSystemHandler = GetSystemHandler()) 1301 if (IFX_SystemHandler* pSystemHandler = GetSystemHandler())
1302 { 1302 {
1303 return pSystemHandler->IsINSERTKeyDown(nFlag); 1303 return pSystemHandler->IsINSERTKeyDown(nFlag);
1304 } 1304 }
1305 1305
1306 return FALSE; 1306 return FALSE;
1307 } 1307 }
1308 1308
OLDNEW
« no previous file with comments | « fpdfsdk/src/pdfwindow/PWL_ListBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698