From: Marius Tomaschewski Date: Thu, 2 Feb 2006 17:26:11 +0000 (+0000) Subject: - Fixed MediaManager::open to not to store invalid handles X-Git-Tag: BASE-SuSE-SLE-10-SP2-Branch~2738 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5884683231345a66f264d7d308f62b0fa33bcd93;p=platform%2Fupstream%2Flibzypp.git - Fixed MediaManager::open to not to store invalid handles --- diff --git a/zypp/media/MediaManager.cc b/zypp/media/MediaManager.cc index b2dff8d..c0855ab 100644 --- a/zypp/media/MediaManager.cc +++ b/zypp/media/MediaManager.cc @@ -149,12 +149,11 @@ namespace zypp // create new access handler for it MediaAccessRef accRef( new MediaAccess()); - MediaId nextId( m_impl->nextMediaId()); - - m_impl->mediaAccMap[nextId] = accRef; accRef->open(url, preferred_attach_point); + m_impl->mediaAccMap[m_impl->nextMediaId()] = accRef; + return nextId; }