summaryrefslogtreecommitdiff
path: root/sowatchd/watchhandler.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-08-17 02:29:28 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-08-17 02:29:28 +0200
commit9c44782c5eab5635ca6adf4717409bf2ffb6c694 (patch)
tree99f774bccb6e964864168b346155bbd5a52bf3b2 /sowatchd/watchhandler.cpp
parentf9ac9d207025fb8d40d1be753cde78beb77aa202 (diff)
downloadsowatch-9c44782c5eab5635ca6adf4717409bf2ffb6c694.tar.gz
sowatch-9c44782c5eab5635ca6adf4717409bf2ffb6c694.zip
new nekowatchlet and minor graphics/performance changes
Diffstat (limited to 'sowatchd/watchhandler.cpp')
-rw-r--r--sowatchd/watchhandler.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/sowatchd/watchhandler.cpp b/sowatchd/watchhandler.cpp
index 4cd86d3..cc75d45 100644
--- a/sowatchd/watchhandler.cpp
+++ b/sowatchd/watchhandler.cpp
@@ -117,9 +117,15 @@ void WatchHandler::updateWatchlets()
// We need to add this watchlet
const QString id = newWatchlets[i];
Watchlet *watchlet = createWatchlet(id);
- _watchlet_order << id;
- _watchlets[id] = watchlet;
- _server->addWatchlet(watchlet);
+ if (watchlet) {
+ _watchlet_order << id;
+ _watchlets[id] = watchlet;
+ _server->addWatchlet(watchlet);
+ } else {
+ qWarning() << "Failed to load watchlet" << id;
+ newWatchlets.removeAt(i);
+ i--; // Retry
+ }
} else if (newWatchlets[i] != _watchlet_order[i]) {
// Let's find out if this watchlet has been moved, or removed.
const QString id = _watchlet_order[i];