backends/drm: check for the output being active before setting legacy gamma
The crtc will be nullptr otherwise
This fixes https://crash-reports.kde.org/share/issue/03f6e28ce13a4075903f4ad99f4d6730/
(cherry picked from commit 9953cf5f)
Co-authored-by: Xaver Hugl xaver.hugl@gmail.com