Skip to content

Commit

Permalink
Fix dereference of null pointer of chart
Browse files Browse the repository at this point in the history
Remove unused values
  • Loading branch information
mtbkeith committed Mar 31, 2017
1 parent c1a85dc commit 1fe5829
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Charts/OverviewWindow.cpp
Expand Up @@ -696,7 +696,7 @@ Card::setData(RideItem *item)
if (type == ZONE) {

// enable animation when setting values (disabled at all other times)
chart->setAnimationOptions(QChart::SeriesAnimations);
if (chart) chart->setAnimationOptions(QChart::SeriesAnimations);

switch(settings.series) {

Expand Down Expand Up @@ -841,8 +841,8 @@ Card::setData(RideItem *item)
if (miny >= 0 && ydiff > miny) miny = ydiff;
double xdiff = (maxx-minx) / 10.0f;
if (minx >= 0 && xdiff > minx) minx = xdiff;
maxx=round(maxx); minx=round(minx); xdiff=round(xdiff);
maxy=round(maxy); miny=round(miny); ydiff=round(ydiff);
maxx=round(maxx); minx=round(minx);
maxy=round(maxy); miny=round(miny);

// set range before points to filter
bubble->setRange(minx,maxx,miny,maxy);
Expand Down

0 comments on commit 1fe5829

Please sign in to comment.