Author: ashaposhnikov
Date: Sat Sep 9 17:40:39 2017
New Revision: 75808
URL:
http://svn.reactos.org/svn/reactos?rev=75808&view=rev
Log:
[RAPPS] Library load fixup in crichedit.h
Modified:
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/crichedit.h
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/crichedit.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
==============================================================================
---
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/crichedit.h [iso-8859-1]
(original)
+++
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/crichedit.h [iso-8859-1]
Sat Sep 9 17:40:39 2017
@@ -4,7 +4,8 @@
class CRichEdit :
public CWindow
{
- HMODULE LoadedLibrary;
+ HMODULE m_LoadedLibrary;
+
VOID GenericInsertText(LPCWSTR lpszText, LONG InsertedTextLen, DWORD dwEffects)
{
SETTEXTEX SetText;
@@ -24,6 +25,8 @@
}
public:
+ CRichEdit() : CWindow(), m_LoadedLibrary(NULL) {}
+
VOID SetRangeFormatting(LONG Start, LONG End, DWORD dwEffects)
{
CHARFORMAT2W CharFormat;
@@ -84,7 +87,7 @@
HWND Create(HWND hwndParent)
{
- LoadedLibrary = LoadLibraryW(L"riched20.dll");
+ m_LoadedLibrary = LoadLibraryW(L"riched20.dll");
m_hWnd = CreateWindowExW(0,
L"RichEdit20W",
@@ -114,7 +117,10 @@
~CRichEdit()
{
- FreeLibrary(LoadedLibrary);
+ if (m_LoadedLibrary)
+ {
+ FreeLibrary(m_LoadedLibrary);
+ }
}
};