mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Prevent potential access to uninitialized variable
If we have a dive with no data (e.g. from a failed import), we might never assign a value otherwise. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
962e71d495
commit
4e40872fc0
1 changed files with 1 additions and 1 deletions
|
@ -572,7 +572,7 @@ DiveMeanDepthItem::DiveMeanDepthItem()
|
||||||
|
|
||||||
void DiveMeanDepthItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
|
void DiveMeanDepthItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
|
||||||
{
|
{
|
||||||
double meandepthvalue;
|
double meandepthvalue = 0.0;
|
||||||
// We don't have enougth data to calculate things, quit.
|
// We don't have enougth data to calculate things, quit.
|
||||||
if (!shouldCalculateStuff(topLeft, bottomRight))
|
if (!shouldCalculateStuff(topLeft, bottomRight))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue