fixed "index out of range"

svn path=/trunk/; revision=18517
This commit is contained in:
Christoph von Wittich 2005-10-17 12:44:16 +00:00
parent 47110fba6f
commit 5afb16c749

View file

@ -566,7 +566,7 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
0,
SRCCOPY);
}
else if (hTopicBitmap[nTopic] != 0)
else if ((nTopic != -1) && (hTopicBitmap[nTopic] != 0))
{
GetObject(hTopicBitmap[nTopic], sizeof(BITMAP), &bmpInfo);
hOldBitmap = SelectObject (hdcMem, hTopicBitmap[nTopic]);