Index: AnnotationDialog/ListSelect.cpp
===================================================================
--- AnnotationDialog/ListSelect.cpp     (revision 581794)
+++ AnnotationDialog/ListSelect.cpp     (working copy)
@@ -377,12 +377,20 @@
             return;

          _category->addItem( subCategory );
-         memberMap.addGroup( _category->name(), item->text(0) );
-         memberMap.addMemberToGroup( _category->name(), item->text(0), subCategory );
-         //DB::ImageDB::instance()->setMemberMap( memberMap );
-        if ( isInputMode() )
-            _category->addItem( subCategory );

+         if ( item ) {
+                memberMap.addGroup( _category->name(), item->text(0) );
+                memberMap.addMemberToGroup( _category->name(), item->text(0), subCategory );
+                //DB::ImageDB::instance()->setMemberMap( memberMap );
+                if ( isInputMode() )
+                _category->addItem( subCategory );
+         }
+         else {
+                _category->addItem( subCategory );
+                memberMap.addGroup( _category->name(), subCategory );
+                //DB::ImageDB::instance()->setMemberMap( memberMap );
+         }
+
         rePopulate();
         if ( isInputMode() ) {
             QListViewItem* item = _listView->findItem( subCategory, 0 );
 
