Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Mythweather - If for some reason the screen doesn't exist in the DB t…

…hen we need to abort the save or insert bogus entries.
  • Loading branch information...
commit 04715f641349e8da25c8232efa6867e17b0be3fa 1 parent e4f9288
@stuartm stuartm authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 mythplugins/mythweather/mythweather/weatherSetup.cpp
View
5 mythplugins/mythweather/mythweather/weatherSetup.cpp
@@ -446,14 +446,13 @@ void ScreenSetup::saveData()
db2.prepare(query2);
db2.bindValue(":DRAW", draworder);
db2.bindValue(":HOST", gCoreContext->GetHostName());
- if (!db2.exec())
+ if (!db2.exec() || !db2.next())
{
LOG(VB_GENERAL, LOG_ERR, db2.executedQuery());
LOG(VB_GENERAL, LOG_ERR, db2.lastError().text());
return;
}
-
- db2.next();
+
int screen_id = db2.value(0).toInt();
query2 = "INSERT INTO weatherdatalayout (location, dataitem, "

0 comments on commit 04715f6

Please sign in to comment.
Something went wrong with that request. Please try again.