projects
/
weightgraph
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b97cb6
)
Fixed a bug that segfaulted on if too few entries
author
Visa Putkinen
<visa.putkinen@iki.fi>
Wed, 30 Mar 2011 11:05:06 +0000
(14:05 +0300)
committer
Visa Putkinen
<visa.putkinen@iki.fi>
Wed, 30 Mar 2011 11:05:06 +0000
(14:05 +0300)
weightgraph/weightgraphview.cpp
patch
|
blob
|
history
diff --git
a/weightgraph/weightgraphview.cpp
b/weightgraph/weightgraphview.cpp
index
a9d93e1
..
4e0d65f
100644
(file)
--- a/
weightgraph/weightgraphview.cpp
+++ b/
weightgraph/weightgraphview.cpp
@@
-152,7
+152,7
@@
void WeightGraphView::paintEvent(QPaintEvent *)
}
// Interpolate to fill gap in left part of the graph
- if (weights.first().date != f && beforeFirst != NULL) {
+ if (weights.size() >= 2 && weights.first().date != f && beforeFirst != NULL) {
DW dw;
dw.date = f;
dw.weight = (weights.first().weight - beforeFirst->weight)