summaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/signal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'signal-composer-binding/signal.cpp')
-rw-r--r--signal-composer-binding/signal.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/signal-composer-binding/signal.cpp b/signal-composer-binding/signal.cpp
index a74889d..faae4a3 100644
--- a/signal-composer-binding/signal.cpp
+++ b/signal-composer-binding/signal.cpp
@@ -288,8 +288,9 @@ double Signal::maximum(int seconds) const
/// @brief Return last value recorded
///
/// @return Last value
-struct SignalValue Signal::last() const
+struct signalValue Signal::last() const
{
+ if(history_.empty()) {return signalValue({0,0,0,0,0,""});}
return history_.rbegin()->second;
}