diff options
Diffstat (limited to 'libsowatch/watchserver.cpp')
-rw-r--r-- | libsowatch/watchserver.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libsowatch/watchserver.cpp b/libsowatch/watchserver.cpp index 511c2c5..3d9db24 100644 --- a/libsowatch/watchserver.cpp +++ b/libsowatch/watchserver.cpp @@ -58,13 +58,16 @@ void WatchServer::setNextWatchletButton(const QString& value) void WatchServer::addWatchlet(Watchlet *watchlet) { + Q_ASSERT(watchlet); insertWatchlet(_watchlets.size(), watchlet); } void WatchServer::insertWatchlet(int position, Watchlet *watchlet) { - const QString id = watchlet->id(); + Q_ASSERT(watchlet); Q_ASSERT(watchlet->_server == this); + + const QString id = watchlet->id(); Q_ASSERT(!_watchletIds.contains(id)); _watchlets.insert(position, watchlet); |