[vlc-commits] [Git][videolan/vlc][master] skins2: remove support for null vlc_window_t

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Sep 27 08:47:59 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
b70cd9d0 by Steve Lhomme at 2025-09-27T08:33:30+00:00
skins2: remove support for null vlc_window_t

The class instances are all created in VoutManager::acceptWnd()
which cannot receive a nullptr vlc_window_t.

- - - - -


1 changed file:

- modules/gui/skins2/src/vout_window.cpp


Changes:

=====================================
modules/gui/skins2/src/vout_window.cpp
=====================================
@@ -46,19 +46,16 @@ VoutWindow::VoutWindow( intf_thread_t *pIntf, vlc_window_t* pWnd,
 {
     OSFactory *pOsFactory = OSFactory::instance( pIntf );
 
-    if( m_pWnd )
-    {
-        updateWindowConfiguration( m_pWnd );
+    assert( m_pWnd != nullptr );
+    updateWindowConfiguration( m_pWnd );
 
-        m_pTimer.reset(pOsFactory->createOSTimer( m_cmdHideMouse ));
-        vlc_wasync_resize_compressor_init(&m_compressor, m_pWnd);
-    }
+    m_pTimer.reset(pOsFactory->createOSTimer( m_cmdHideMouse ));
+    vlc_wasync_resize_compressor_init(&m_compressor, m_pWnd);
 }
 
 VoutWindow::~VoutWindow()
 {
-    if (m_pWnd)
-        vlc_wasync_resize_compressor_destroy(&m_compressor);
+    vlc_wasync_resize_compressor_destroy(&m_compressor);
 }
 
 void VoutWindow::setCtrlVideo( CtrlVideo* pCtrlVideo )
@@ -95,8 +92,7 @@ void VoutWindow::resize( int width, int height )
 {
     GenericWindow::resize( width, height );
 
-    if( m_pWnd )
-        vlc_wasync_resize_compressor_reportSize(&m_compressor, width, height);
+    vlc_wasync_resize_compressor_reportSize(&m_compressor, width, height);
 }
 
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b70cd9d0b3ba9034a7b0366b6d0a10de142597a1

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b70cd9d0b3ba9034a7b0366b6d0a10de142597a1
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list