From 303fb6c7ff1ee424dbeed13d0a7d450d0950d139 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sat, 23 Jul 2011 13:50:30 +1000 Subject: [PATCH] YAxis Error Test, CONFIG+=rtti config for fedora 15 mingw32 --- Graphs/gYAxis.cpp | 5 +++++ SleepyHeadQT.pro | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Graphs/gYAxis.cpp b/Graphs/gYAxis.cpp index 4d8b1851..ca848846 100644 --- a/Graphs/gYAxis.cpp +++ b/Graphs/gYAxis.cpp @@ -70,10 +70,15 @@ void gYAxis::Plot(gGraphWindow &w,float scrx,float scry) glColor4ub(linecol1.red(),linecol1.green(),linecol1.blue(),linecol1.alpha()); glLineWidth(1); + if (min_ytick<=0) { + qDebug() << "min_ytick error in gYAxis::Plot()"; + return; + } if (min_ytick>=1000000) { min_ytick=100; } + for (double i=miny+(min_ytick/2.0); i