- Fixed MediaManager::open to not to store invalid handles
authorMarius Tomaschewski <mt@suse.de>
Thu, 2 Feb 2006 17:26:11 +0000 (17:26 +0000)
committerMarius Tomaschewski <mt@suse.de>
Thu, 2 Feb 2006 17:26:11 +0000 (17:26 +0000)
zypp/media/MediaManager.cc

index b2dff8d..c0855ab 100644 (file)
@@ -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;
     }