Skip to content

Commit

Permalink
Clean up orphaned inputgroups
Browse files Browse the repository at this point in the history
in various places when UnlinkInputGroup(0,0) is called.

Fixes #10992 with a slightly modified patch, based on the SQL provided
by Karl Dietz.
  • Loading branch information
sphery committed Aug 12, 2012
1 parent be2f9d9 commit 33fe7e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mythtv/libs/libmythtv/cardutil.cpp
Expand Up @@ -1563,7 +1563,8 @@ bool CardUtil::UnlinkInputGroup(uint inputid, uint inputgroupid)
{
query.prepare(
"DELETE FROM inputgroup "
"WHERE cardinputid = 0 ");
"WHERE cardinputid NOT IN "
"( SELECT cardinputid FROM cardinput )");
}
else
{
Expand Down

0 comments on commit 33fe7e9

Please sign in to comment.