backends/drm: Fix accessing a dangling reference
m_commits.front()
is a reference to the first item in the m_commits
list. If it's submitted sucessfully, everything will be alright.
If the candidate commit fails, it can be merged with other pending commits in the m_commits list. It will also invalidate any previously taken reference to the first item in the m_commits list, which is not okay for commit->test().
Edited by Vlad Zahorodnii