diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2012-08-17 02:29:28 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2012-08-17 02:29:28 +0200 |
commit | 9c44782c5eab5635ca6adf4717409bf2ffb6c694 (patch) | |
tree | 99f774bccb6e964864168b346155bbd5a52bf3b2 /sowatchd/watchhandler.cpp | |
parent | f9ac9d207025fb8d40d1be753cde78beb77aa202 (diff) | |
download | sowatch-9c44782c5eab5635ca6adf4717409bf2ffb6c694.tar.gz sowatch-9c44782c5eab5635ca6adf4717409bf2ffb6c694.zip |
new nekowatchlet and minor graphics/performance changes
Diffstat (limited to 'sowatchd/watchhandler.cpp')
-rw-r--r-- | sowatchd/watchhandler.cpp | 12 |
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]; |