mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
add sigc disconnect() to destructor, avoid segfault if use new/delete CUpnpBrowserGui in other menu
Origin commit data
------------------
Commit: 547572e11e
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2020-01-24 (Fri, 24 Jan 2020)
This commit is contained in:
@@ -83,8 +83,8 @@ CUpnpBrowserGui::CUpnpBrowserGui()
|
||||
image = NULL;
|
||||
|
||||
sigc::slot0<void> reinit = sigc::mem_fun(this, &CUpnpBrowserGui::Init);
|
||||
CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(reinit);
|
||||
CFrameBuffer::getInstance()->OnAfterSetPallette.connect(reinit);
|
||||
sigFonts = CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(reinit);
|
||||
sigPall = CFrameBuffer::getInstance()->OnAfterSetPallette.connect(reinit);
|
||||
}
|
||||
|
||||
void CUpnpBrowserGui::Init()
|
||||
@@ -164,12 +164,16 @@ void CUpnpBrowserGui::Init()
|
||||
|
||||
CUpnpBrowserGui::~CUpnpBrowserGui()
|
||||
{
|
||||
sigFonts.disconnect();
|
||||
sigPall.disconnect();
|
||||
|
||||
delete m_socket;
|
||||
if (dline){
|
||||
delete dline; dline = NULL;
|
||||
}
|
||||
if (image)
|
||||
if (image){
|
||||
delete image, image = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int CUpnpBrowserGui::exec(CMenuTarget* parent, const std::string & /*actionKey*/)
|
||||
|
Reference in New Issue
Block a user