diff options
author | Neil <nyamatongwe@gmail.com> | 2015-01-05 16:10:00 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2015-01-05 16:10:00 +1100 |
commit | 16304785292ef52d9299f0e957c5198eea68d0fb (patch) | |
tree | 13b27a2e2a3376cc668fcd4e124732a875ba88ce | |
parent | 85508a90a8e2c9e9a2a7fa8f646925962f60d367 (diff) | |
download | scintilla-mirror-16304785292ef52d9299f0e957c5198eea68d0fb.tar.gz |
Allocate is only called when no handle in constructor so assert that to avoid
warning from cppcheck.
-rw-r--r-- | win32/ScintillaWin.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index ec72a405a..161b4831e 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1999,6 +1999,7 @@ public: PLATFORM_ASSERT(!ptr); } void Allocate(size_t bytes) { + assert(!hand); hand = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, bytes); if (hand) { ptr = ::GlobalLock(hand); |