Changeset 404dd8435cecf6f9de866b9b0d51b3db4bb1aa5c

Show
Ignore:
Timestamp:
09/23/08 22:52:30 (5 years ago)
Author:
Armin Burgmeier <armin@…>
Parents:
3a148d02289248eaa372bf5e6fda1252df1bc646
Children:
2c6703406e49628a79694cd0405753ff63b26880
git-committer:
Armin Burgmeier <armin@arbur.net> / 2008-09-23T22:52:30Z+0200
Message:

FIxed a crash in the JoinDialog? when the avahi daemon is not running

2008-09-23 Armin Burgmeier <armin@…>

  • src/joindialog.cpp: Fixed a crash introduced in the last version that occurs when using the dialog without the avahi daemon being running (Bug #266, Yannick_LM)
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r3a148d0 r404dd84  
     12008-09-23  Armin Burgmeier  <armin@0x539.de> 
     2 
     3        * src/joindialog.cpp: Fixed a crash introduced in the last version 
     4        that occurs when using the dialog without the avahi daemon being 
     5        running (Bug #266, Yannick_LM) 
     6 
    172008-09-11  Philipp Kern  <phil@0x539.de> 
    28 
  • src/joindialog.cpp

    r9b6eca5 r404dd84  
    187187{ 
    188188#ifdef WITH_ZEROCONF 
    189         const Gtk::TreeModel::Children& children = m_session_list->children(); 
    190         for(Gtk::TreeIter iter = children.begin(); 
    191             iter != children.end(); ++ iter) 
    192         { 
    193                 net6::address* addr = (*iter)[m_session_cols.address]; 
    194                 delete addr; 
     189        if(m_session_list) 
     190        { 
     191                const Gtk::TreeModel::Children& children = 
     192                        m_session_list->children(); 
     193 
     194                for(Gtk::TreeIter iter = children.begin(); 
     195                    iter != children.end(); ++ iter) 
     196                { 
     197                        net6::address* addr = (*iter)[m_session_cols.address]; 
     198                        delete addr; 
     199                } 
    195200        } 
    196201#endif 
     
    210215{ 
    211216#ifdef WITH_ZEROCONF 
     217        if(!m_session_list) 
     218                return NULL; 
     219 
    212220        // m_session_view.get_selection() is not const, therefore this function 
    213221        // cannot be const. 
    214222        Gtk::TreeModel::iterator iter = 
    215223                m_session_view.get_selection()->get_selected(); 
    216         if(iter != m_session_list->children().end()) 
     224        if(iter && iter != m_session_list->children().end()) 
    217225        { 
    218226                // Use address with port info if selected from zeroconf