diff options
author | Oliver Schneider <oliver@assarbad.net> | 2018-10-09 23:19:01 +0300 |
---|---|---|
committer | Oliver Schneider <oliver@assarbad.net> | 2018-10-09 23:19:01 +0300 |
commit | c26c2bc4a1e97ea50a2daad620c343e6c5dd81c1 (patch) | |
tree | b0aeee294bcb1aa69bdfdc34fe2e9043c4012e50 /windirstat/mainframe.cpp | |
parent | 3008e91efac446fc21d607485cb787c457401a8b (diff) |
Fixed a number of warnings from the static analyzer and switched to GetTickCount64 (or a surrogate function on pre-Vista) whereever we use millisecond values
Diffstat (limited to 'windirstat/mainframe.cpp')
-rw-r--r-- | windirstat/mainframe.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/windirstat/mainframe.cpp b/windirstat/mainframe.cpp index 25d3a43..bbf8a2e 100644 --- a/windirstat/mainframe.cpp +++ b/windirstat/mainframe.cpp @@ -556,7 +556,7 @@ void CMainFrame::UpdateProgress() if(IsProgressSuspended()) { - suspended.LoadString(IDS_SUSPENDED_); + VERIFY(suspended.LoadString(IDS_SUSPENDED_)); } if(m_progressRange > 0) @@ -897,6 +897,11 @@ void CMainFrame::CopyToClipboard(LPCTSTR psz) LPVOID lp = ::GlobalLock(h); ASSERT(lp != NULL); + if (!lp) + { + MdThrowStringException(_T("GlobalLock failed.")); + } + _tcscpy_s((LPTSTR)lp, cchBufLen, psz); ::GlobalUnlock(h); |