diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-04-15 19:45:07 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-04-15 19:45:07 +0000 |
commit | da985f982d63b06db8784199105f73bc0a4d6fc6 (patch) | |
tree | 0db5197388ed0b69847259488f6abf52277eb7f1 /plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp | |
parent | 9e3ba523300180641ef7a22f791bd3ae89ec4785 (diff) |
MirandaG15:
- minor bugfixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@12843 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp')
-rw-r--r-- | plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp index 7d531cbea8..647cf8bf49 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp @@ -534,7 +534,7 @@ void CLCDInput::MoveMarker(int iDir,int iMove,bool bShift) }
}
- free(piWidths);
+ delete[] piWidths;
if(m_Marker[0].iPosition == -1)
{
@@ -598,6 +598,10 @@ void CLCDInput::UpdateOffsets(int iModified) {
if(m_vLineOffsets.size() == 0 && m_strText.empty())
return;
+
+ HDC hDC = CreateCompatibleDC(NULL);
+ if(NULL == hDC)
+ return;
// Reset the marker
m_Marker[0].iXLine = 0;
@@ -613,9 +617,6 @@ void CLCDInput::UpdateOffsets(int iModified) SIZE sizeWord = {0, 0};
SIZE sizeChar = {0, 0};
SIZE sizeLine = {0, 0};
- HDC hDC = CreateCompatibleDC(NULL);
- if(NULL == hDC)
- return;
SelectObject(hDC, m_hFont);
int iLine = -1;
@@ -778,7 +779,7 @@ void CLCDInput::UpdateOffsets(int iModified) }
finished:
- free(piWidths);
+ delete[] piWidths;
DeleteObject(hDC);
if(m_pScrollbar)
|