CID 323 and CID 324: Also check the results of these dynamic_casts, sorry for

not combining with the previous commit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27474 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2008-09-13 12:36:17 +00:00
parent 446d046c5e
commit 020f56a07f
+6
View File
@@ -27,6 +27,9 @@ void
ChartView::Draw(BRect rect)
{
ChartWindow *window = dynamic_cast<ChartWindow *>(Window());
if (window == NULL)
return;
if ((window->fOffscreen != 0) && (window->fCurrentSettings.display == DISPLAY_BITMAP))
DrawBitmap(window->fOffscreen, rect, rect);
}
@@ -58,6 +61,9 @@ void
InstantView::Draw(BRect rect)
{
ChartWindow *window = dynamic_cast<ChartWindow *>(Window());
if (window == NULL)
return;
for (int32 i = 0; i < window->fInstantLoadLevel; i++) {
if (i < step)
SetHighColor(255, 90, 90);