summaryrefslogtreecommitdiff
path: root/plugins/FingerprintNG
diff options
context:
space:
mode:
authorGoraf <goraf@miranda-ng.org>2016-01-30 21:56:49 +0000
committerGoraf <goraf@miranda-ng.org>2016-01-30 21:56:49 +0000
commitc820fb6a8648b63e6d7d40b165ac047533dadfa3 (patch)
treee8bdc10a76a64b659ddae930561aa556faa687da /plugins/FingerprintNG
parent66d36547ef14644965d9a5afa46e4056716664b2 (diff)
BITMAPINFO initialization
git-svn-id: http://svn.miranda-ng.org/main/trunk@16199 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FingerprintNG')
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index 6d9fb1deed..6fd60942de 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -438,18 +438,17 @@ HBITMAP __inline CreateBitmap32(int cx, int cy)
*/
HBITMAP __fastcall CreateBitmap32Point(int cx, int cy, LPVOID* bits)
{
- BITMAPINFO bmpi = { 0 };
LPVOID ptPixels = NULL;
- HBITMAP DirectBitmap;
if (cx < 0 || cy < 0) return NULL;
+ BITMAPINFO bmpi = { 0 };
bmpi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmpi.bmiHeader.biWidth = cx;
bmpi.bmiHeader.biHeight = cy;
bmpi.bmiHeader.biPlanes = 1;
bmpi.bmiHeader.biBitCount = 32;
- DirectBitmap = CreateDIBSection(NULL, &bmpi, DIB_RGB_COLORS, &ptPixels, NULL, 0);
+ HBITMAP DirectBitmap = CreateDIBSection(NULL, &bmpi, DIB_RGB_COLORS, &ptPixels, NULL, 0);
GdiFlush();
if (ptPixels) memset(ptPixels, 0, cx * cy * 4);