fixed "index out of range"
authorChristoph von Wittich <christoph_vw@reactos.org>
Mon, 17 Oct 2005 12:44:16 +0000 (12:44 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Mon, 17 Oct 2005 12:44:16 +0000 (12:44 +0000)
svn path=/trunk/; revision=18517

reactos/subsys/system/welcome/welcome.c

index e59a02a..9f5bf91 100755 (executable)
@@ -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]);