[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.5/kdenetwork/kopete/libkopete/avdevice
From:       Frank Schaefer <fschaefer.oss () googlemail ! com>
Date:       2010-09-03 15:36:38
Message-ID: 20100903153638.807E5AC883 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1171380 by fschaefer:

Fix bug that could cause device switching (on removal of the current video device) to fail

The way QVector organizes its content can cause the destructors of the
videodevice objects to be called (even when they are not deleted).
Closing the video device in the destructor will therefore cause trouble.


 M  +0 -1      videodevice.cpp  
 M  +1 -1      videodevicepool.cpp  


--- branches/KDE/4.5/kdenetwork/kopete/libkopete/avdevice/videodevice.cpp #1171379:1171380
@@ -46,7 +46,6 @@
 
 VideoDevice::~VideoDevice()
 {
-	close();
 }
 
 /*!
--- branches/KDE/4.5/kdenetwork/kopete/libkopete/avdevice/videodevicepool.cpp #1171379:1171380
@@ -863,7 +863,7 @@
 		if ( vd.udi() == udi )
 		{
 			kDebug() << "Video device '" << udi << "' has been removed!";
-			// not sure if this is safe but at this point the device node is gone already anyway
+			vd.close();
 			m_videodevice.remove( i );
 			if (m_current_device == i)
 			{
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic