Skip to content

Commit

Permalink
fixed crash
Browse files Browse the repository at this point in the history
if extension didn't request any of these resources
  • Loading branch information
benapetr committed Nov 10, 2017
1 parent 85c71a9 commit 2e53b2c
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions huggle/iextension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@ QString iExtension::GetExtensionFullPath()

void iExtension::Init()
{
Huggle::Core::HuggleCore = (Huggle::Core*) this->HuggleCore;
Huggle::QueryPool::HugglePool = Huggle::Core::HuggleCore->HGQP;
if (this->RequestCore())
{
Huggle::Core::HuggleCore = (Huggle::Core*) this->HuggleCore;
Huggle::QueryPool::HugglePool = Huggle::Core::HuggleCore->HGQP;
Huggle::Syslog::HuggleLogs = Huggle::Core::HuggleCore->HuggleSyslog;
Huggle::GC::gc = Huggle::Core::HuggleCore->gc;
}
Huggle::Localizations::HuggleLocalizations = (Huggle::Localizations*) this->Localization;
Huggle::Syslog::HuggleLogs = Huggle::Core::HuggleCore->HuggleSyslog;
Huggle::GC::gc = Huggle::Core::HuggleCore->gc;
Huggle::Query::NetworkManager = this->Networking;
Huggle::Configuration::HuggleConfiguration = (Huggle::Configuration*) this->Configuration;
if (this->RequestNetwork())
Huggle::Query::NetworkManager = this->Networking;
if (this->RequestConfiguration())
Huggle::Configuration::HuggleConfiguration = (Huggle::Configuration*) this->Configuration;
}

QString iExtension::GetConfig(QString key, QString dv)
Expand Down

0 comments on commit 2e53b2c

Please sign in to comment.