Prevent GSource double-destroy warning messages (#729800)
Returning false from the OnReadable callback causes the source to be destroyed, but PipeCapture::~PipeCapture was destroying it a second time. Prevent this by zeroing out the sourceid. Bug 729800 - Prevent GSource double-destroy warning messages
This commit is contained in:
parent
f4e1c351f0
commit
2e7b5d05a6
|
@ -41,7 +41,11 @@ gboolean PipeCapture::_OnReadable( GIOChannel *source,
|
|||
GIOCondition condition,
|
||||
gpointer data )
|
||||
{
|
||||
return static_cast<PipeCapture *>(data)->OnReadable( Glib::IOCondition(condition) );
|
||||
PipeCapture *pc = static_cast<PipeCapture *>(data);
|
||||
gboolean rc = pc->OnReadable( Glib::IOCondition(condition) );
|
||||
if (!rc)
|
||||
pc->sourceid = 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue