segfault when using UIManager



Hello,

The last line in this function leads to a segmentation fault:

FileBrowser::FileBrowser()
    : m_ActionGroup( Gtk::ActionGroup::create() ),
      m_UIManager( Gtk::UIManager::create() )
{
    // snipped irrevelant stuff

    m_ActionGroup->add(
    Gtk::Action::create( "Quit", Gtk::Stock::QUIT ), sigc::mem_fun( *this,
&FileBrowser::on_action_quit )
    );

    m_UIManager->insert_action_group( m_ActionGroup );

    Glib::ustring ui_info =
        "<ui>"
        "  <popup name='PopupMenu'>"
        "    <menuitem action='Quit'/>"
        "  </popup>"
        "</ui";

    m_UIManager->add_ui_from_string( ui_info ); // segfault here
}

m_UIManager and m_ActionGroup are Glib::RefPtrS. Any idea what is causing this?

-- 
Matthias Kaeppler 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]