From c820fb6a8648b63e6d7d40b165ac047533dadfa3 Mon Sep 17 00:00:00 2001
From: Goraf <goraf@miranda-ng.org>
Date: Sat, 30 Jan 2016 21:56:49 +0000
Subject: BITMAPINFO initialization

git-svn-id: http://svn.miranda-ng.org/main/trunk@16199 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
---
 plugins/Popup/src/bitmap_funcs.cpp | 3 +--
 plugins/Popup/src/opt_skins.cpp    | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

(limited to 'plugins/Popup')

diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp
index f28dba8f28..a4f87e9c28 100644
--- a/plugins/Popup/src/bitmap_funcs.cpp
+++ b/plugins/Popup/src/bitmap_funcs.cpp
@@ -767,14 +767,13 @@ void MyBitmap::allocate(int w, int h)
 		DeleteDC(dcBmp);
 	}
 
-	BITMAPINFO bi;
+	BITMAPINFO bi = { 0 };
 	bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
 	bi.bmiHeader.biWidth = w;
 	bi.bmiHeader.biHeight = -h;
 	bi.bmiHeader.biPlanes = 1;
 	bi.bmiHeader.biBitCount = 32;
 	bi.bmiHeader.biCompression = BI_RGB;
-	bi.bmiColors[0].rgbRed = bi.bmiColors[0].rgbGreen =  bi.bmiColors[0].rgbBlue = bi.bmiColors[0].rgbReserved = 0;
 
 	hBmp = (HBITMAP)CreateDIBSection(0, &bi, DIB_RGB_COLORS, (void **)&bits, 0, 0);
 	dcBmp = CreateCompatibleDC(0);
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp
index 1fd334b1e7..70284a3f37 100644
--- a/plugins/Popup/src/opt_skins.cpp
+++ b/plugins/Popup/src/opt_skins.cpp
@@ -94,7 +94,7 @@ static void updatePreviewImage(HWND hwndBox)
 
 static void DrawPreview(HWND hwnd, HDC hdc)
 {
-	BITMAPINFO bi;
+	BITMAPINFO bi = { 0 };
 	bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
 	bi.bmiHeader.biWidth = 8;
 	bi.bmiHeader.biHeight = -8;
-- 
cgit v1.2.3