Skip to content

Commit

Permalink
fixed a crash in tags form
Browse files Browse the repository at this point in the history
  • Loading branch information
benapetr committed Apr 10, 2015
1 parent 0b4764d commit c8461b4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions huggle/wikipagetagsform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,7 @@ void Huggle::WikiPageTagsForm_FinishRead(Query *result)
if (!form->Arguments.contains(tag))
throw new Huggle::Exception("No such a tag in hash table", BOOST_CURRENT_FUNCTION);
QString key = "{{" + form->page->GetSite()->GetProjectConfig()->Tags.at(xx) + "}}";
if (!form->page->GetSite()->GetProjectConfig()->TagsArgs.contains(tag))
throw new Huggle::Exception("No such a tag in args hash: " + tag, BOOST_CURRENT_FUNCTION);
if (!form->page->GetSite()->GetProjectConfig()->TagsArgs[tag].isEmpty())
if (form->page->GetSite()->GetProjectConfig()->TagsArgs.contains(tag) && !form->page->GetSite()->GetProjectConfig()->TagsArgs[tag].isEmpty())
{
if (form->Arguments[tag]->text() == form->page->GetSite()->GetProjectConfig()->TagsArgs[tag])
{
Expand Down

0 comments on commit c8461b4

Please sign in to comment.