dont crash
This commit is contained in:
parent
4e515ae8a0
commit
d6a36d336a
|
@ -112,6 +112,7 @@ LolAutoAccept::~LolAutoAccept() {
|
|||
void LolAutoAccept::setChamp(const std::string& champ, State s) {
|
||||
if(s == State::LOBBY || s >= State::GAME) {
|
||||
Log::warn << "setChamp() called on invalid State";
|
||||
return;
|
||||
}
|
||||
|
||||
stages.at((int) s)->champ = champ;
|
||||
|
@ -120,6 +121,7 @@ void LolAutoAccept::setChamp(const std::string& champ, State s) {
|
|||
void LolAutoAccept::setEnabled(bool b, State s) {
|
||||
if(s >= State::GAME) {
|
||||
Log::warn << "setEnabled() called on invalid State";
|
||||
return;
|
||||
}
|
||||
|
||||
stages.at((int) s)->enabled = b;
|
||||
|
@ -184,7 +186,7 @@ void LolAutoAccept::innerRun() {
|
|||
cv::resize(img, img, cv::Size(ScreenShot::DEFAULTWIDTH, ScreenShot::DEFAULTHEIGHT));
|
||||
|
||||
for(size_t i = 0; i < stages.size(); ++i) {
|
||||
// Log::trace << "processing stage " << i;
|
||||
Log::trace << "processing stage " << i;
|
||||
Stage* stage = stages.at(i);
|
||||
if(stage->process(*this, img)) {
|
||||
Log::debug << "stage successful: " << i;
|
||||
|
|
Loading…
Reference in New Issue