backends/drm: check if m_commits is empty after waiting for commitPending
The main thread might've cleared the list, so it could crash
Fixes https://crash-reports.kde.org/share/issue/1e34fff2ef0d48f29fb64748caef884a/
(cherry picked from commit 7f4e1ca1)
Co-authored-by: Xaver Hugl xaver.hugl@gmail.com