From 7a38b21f49961ffc4c2b6a6327a7a933a5278636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 18 Jan 2015 00:51:14 +0100 Subject: [PATCH] do not reinterpret_cast insufficient data BUG: 341010 FIXED-IN: 5.5 REVIEW: 125513 --- effects/kscreen/kscreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/effects/kscreen/kscreen.cpp b/effects/kscreen/kscreen.cpp index ab13f46514..67f4551c98 100644 --- a/effects/kscreen/kscreen.cpp +++ b/effects/kscreen/kscreen.cpp @@ -122,7 +122,7 @@ void KscreenEffect::propertyNotify(EffectWindow *window, long int atom) return; } QByteArray byteData = effects->readRootProperty(m_atom, XCB_ATOM_CARDINAL, 32); - auto *data = reinterpret_cast(byteData.data()); + const uint32_t *data = byteData.isEmpty() ? nullptr : reinterpret_cast(byteData.data()); if (!data // Property was deleted || data[0] == 0) { // normal state - KWin should have switched to it if (m_state != StateNormal) {