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:
@@ -27,6 +27,9 @@ void
|
|||||||
ChartView::Draw(BRect rect)
|
ChartView::Draw(BRect rect)
|
||||||
{
|
{
|
||||||
ChartWindow *window = dynamic_cast<ChartWindow *>(Window());
|
ChartWindow *window = dynamic_cast<ChartWindow *>(Window());
|
||||||
|
if (window == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
if ((window->fOffscreen != 0) && (window->fCurrentSettings.display == DISPLAY_BITMAP))
|
if ((window->fOffscreen != 0) && (window->fCurrentSettings.display == DISPLAY_BITMAP))
|
||||||
DrawBitmap(window->fOffscreen, rect, rect);
|
DrawBitmap(window->fOffscreen, rect, rect);
|
||||||
}
|
}
|
||||||
@@ -58,6 +61,9 @@ void
|
|||||||
InstantView::Draw(BRect rect)
|
InstantView::Draw(BRect rect)
|
||||||
{
|
{
|
||||||
ChartWindow *window = dynamic_cast<ChartWindow *>(Window());
|
ChartWindow *window = dynamic_cast<ChartWindow *>(Window());
|
||||||
|
if (window == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
for (int32 i = 0; i < window->fInstantLoadLevel; i++) {
|
for (int32 i = 0; i < window->fInstantLoadLevel; i++) {
|
||||||
if (i < step)
|
if (i < step)
|
||||||
SetHighColor(255, 90, 90);
|
SetHighColor(255, 90, 90);
|
||||||
|
|||||||
Reference in New Issue
Block a user