[vlc-commits] skins2(x11): fix vlc crashing on Kwin

Erwan Tulou git at videolan.org
Sun Jun 17 20:15:57 CEST 2018


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Sun Jun 17 19:51:36 2018 +0200| [31315a5af37181b7be9b083bee77c8df85c67909] | committer: Erwan Tulou

skins2(x11): fix vlc crashing on Kwin

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=31315a5af37181b7be9b083bee77c8df85c67909
---

 modules/gui/skins2/x11/x11_factory.cpp | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/modules/gui/skins2/x11/x11_factory.cpp b/modules/gui/skins2/x11/x11_factory.cpp
index 8857a72d7b..5bd68ec90e 100644
--- a/modules/gui/skins2/x11/x11_factory.cpp
+++ b/modules/gui/skins2/x11/x11_factory.cpp
@@ -344,11 +344,14 @@ SkinsRect X11Factory::getWorkArea() const
                                 &ret, &i_format, &i_items, &i_bytesafter,
                                 (unsigned char **)&values ) == Success )
         {
-            x = values[0];
-            y = values[1];
-            w = values[2];
-            h = values[3];
-            XFree( values );
+            if( values )
+            {
+                x = values[0];
+                y = values[1];
+                w = values[2];
+                h = values[3];
+                XFree( values );
+            }
         }
     }
     msg_Dbg( getIntf(),"WorkArea: %ix%i at +%i+%i", w, h, x, y );



More information about the vlc-commits mailing list