diff options
Diffstat (limited to 'basic/source/basmgr/basmgr.cxx')
-rw-r--r-- | basic/source/basmgr/basmgr.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 5e909b2cebae..3de240f08bda 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -533,12 +533,14 @@ void BasicLibs::Insert( BasicLibInfo* LibInfo ) BasicLibInfo* BasicLibs::Remove( BasicLibInfo* LibInfo ) { - size_t i = GetPos( LibInfo ); - if ( i < aList.size() ) + vector< BasicLibInfo* >::iterator it, eit = aList.end(); + for (it = aList.begin(); it != eit; ++it) { - vector< BasicLibInfo* >::iterator it = aList.begin(); - advance( it , i ); - it = aList.erase( it ); + if (*it == LibInfo) + { + aList.erase(it); + break; + } } return LibInfo; } |