Commit 87808807 authored by Antoine Cellerier's avatar Antoine Cellerier

this still doesn't look safe but at least i can't see why it would

segfault
parent 909ee460
...@@ -348,7 +348,9 @@ void UpdateVLC::GetData() ...@@ -348,7 +348,9 @@ void UpdateVLC::GetData()
psz_eltvalue = xml_ReaderValue( p_xml_reader ); psz_eltvalue = xml_ReaderValue( p_xml_reader );
msg_Dbg( p_intf, " text : %s", psz_eltvalue ); msg_Dbg( p_intf, " text : %s", psz_eltvalue );
/* This doesn't look safe ... but it works */ /* This doesn't look safe ... but it works */
it->m_files.back().description = wxU( psz_eltvalue ); if( !m_versions.empty() )
if( !it->m_files.empty() )
it->m_files.back().description = wxU( psz_eltvalue );
free( psz_eltvalue ); free( psz_eltvalue );
break; break;
} }
...@@ -491,7 +493,7 @@ void UpdateVLC::UpdateUpdatesTree() ...@@ -491,7 +493,7 @@ void UpdateVLC::UpdateUpdatesTree()
/* build tree */ /* build tree */
parent = updates_tree->AppendItem( updates_root, wxT( "" ) ); parent = updates_tree->AppendItem( updates_root, wxT( "" ) );
updates_tree->AppendItem( parent, updates_tree->AppendItem( parent,
wxT( "Current version : "PACKAGE_VERSION ), wxT( "Current version : "PACKAGE_VERSION_MAJOR"."PACKAGE_VERSION_MINOR"."PACKAGE_VERSION_REVISION"-"PACKAGE_VERSION_EXTRA ),
-1, -1, new UpdatesTreeItem( wxT( "" ) )); -1, -1, new UpdatesTreeItem( wxT( "" ) ));
it = m_versions.begin(); it = m_versions.begin();
while( it != m_versions.end() ) while( it != m_versions.end() )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment