Skip to content

Commit

Permalink
Revert a change I made to TimerEvent handling in ControllerEngine.
Browse files Browse the repository at this point in the history
Add a note about this change causing segfaults while scratching.
  • Loading branch information
rryan committed Dec 4, 2014
1 parent 519ec72 commit 9744610
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/controllers/controllerengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,11 @@ void ControllerEngine::timerEvent(QTimerEvent *event) {
return;
}

const TimerInfo& timerTarget = it.value();
// NOTE(rryan): Do not assign by reference -- make a copy. I have no idea
// why but this causes segfaults in ~QScriptValue while scratching if we
// don't copy here -- even though internalExecute passes the QScriptValues
// by value. *boggle*
const TimerInfo timerTarget = it.value();
if (timerTarget.oneShot) {
stopTimer(timerId);
}
Expand Down

0 comments on commit 9744610

Please sign in to comment.