Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp	(revision 3fe31809465087526b25224aaeb6783b78d555b6)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp	(revision 7ded1c2e6b5dc07f58723eaa1665215ba1d857b4)
@@ -361,32 +361,35 @@
   LOG(3, "INFO: GLMoleculeObject_molecule: Received signal atomInserted for atom "+toString(_id)+".");
 
-  GLMoleculeObject_atom *atomObject =
-      new GLMoleculeObject_atom(
-          GLMoleculeObject::meshSphere,
-          this,
-          board.getObservedAtom(_id));
-  ASSERT( atomObject != NULL,
-      "GLMoleculeObject_molecule::atomInserted - could not create atom object for "+toString(_id));
-  AtomNodeMap::iterator iter = AtomsinSceneMap.find(_id);
-  ASSERT(iter == AtomsinSceneMap.end(),
-      "GLMoleculeObject_molecule::atomInserted - same atom with id "+toString(_id)+" added again.");
-  AtomsinSceneMap.insert( make_pair(_id, atomObject) );
-
-  qRegisterMetaType<atomId_t>("atomId_t");
-  qRegisterMetaType<GLMoleculeObject_bond::SideOfBond>("GLMoleculeObject_bond::SideOfBond");
-  connect (atomObject, SIGNAL(clicked(atomId_t)), this, SIGNAL(atomClicked(atomId_t)));
-  connect (atomObject, SIGNAL(changed()), this, SIGNAL(changed()));
-  connect (atomObject, SIGNAL(hoverChanged(GLMoleculeObject *)), this, SIGNAL(changed()));
-  connect (atomObject, SIGNAL(hoverChanged(GLMoleculeObject *)), this, SLOT(hoverChangedSignalled(GLMoleculeObject *)));
-//  connect (atomObject, SIGNAL(bondsChanged()), this, SLOT(bondInserted(const atomId_t, const atomId_t, const GLMoleculeObject_bond::SideOfBond)));
-  connect (atomObject, SIGNAL(BondsAdded(const atomId_t, const atomId_t, const GLMoleculeObject_bond::SideOfBond)), this, SLOT(bondInserted(const atomId_t, const atomId_t, const GLMoleculeObject_bond::SideOfBond)));
-  connect (atomObject, SIGNAL(BondsRemoved(const atomId_t, const atomId_t)), this, SLOT(bondRemoved(const atomId_t, const atomId_t)));
-  connect (atomObject, SIGNAL(indexChanged(GLMoleculeObject_atom*, const atomId_t, const atomId_t)), this, SLOT(changeAtomId(GLMoleculeObject_atom*, const atomId_t, const atomId_t)));
-
-  if (m_objectId  == -1)
-    setObjectId(_id);
-
-  emit changed();
-  emit changeOccured();
+  const QtObservedAtom::ptr _atom = board.getObservedAtom(_id);
+  if (_atom) {
+    GLMoleculeObject_atom *atomObject =
+        new GLMoleculeObject_atom(
+            GLMoleculeObject::meshSphere,
+            this,
+            _atom);
+    ASSERT( atomObject != NULL,
+        "GLMoleculeObject_molecule::atomInserted - could not create atom object for "+toString(_id));
+    AtomNodeMap::iterator iter = AtomsinSceneMap.find(_id);
+    ASSERT(iter == AtomsinSceneMap.end(),
+        "GLMoleculeObject_molecule::atomInserted - same atom with id "+toString(_id)+" added again.");
+    AtomsinSceneMap.insert( make_pair(_id, atomObject) );
+
+    qRegisterMetaType<atomId_t>("atomId_t");
+    qRegisterMetaType<GLMoleculeObject_bond::SideOfBond>("GLMoleculeObject_bond::SideOfBond");
+    connect (atomObject, SIGNAL(clicked(atomId_t)), this, SIGNAL(atomClicked(atomId_t)));
+    connect (atomObject, SIGNAL(changed()), this, SIGNAL(changed()));
+    connect (atomObject, SIGNAL(hoverChanged(GLMoleculeObject *)), this, SIGNAL(changed()));
+    connect (atomObject, SIGNAL(hoverChanged(GLMoleculeObject *)), this, SLOT(hoverChangedSignalled(GLMoleculeObject *)));
+  //  connect (atomObject, SIGNAL(bondsChanged()), this, SLOT(bondInserted(const atomId_t, const atomId_t, const GLMoleculeObject_bond::SideOfBond)));
+    connect (atomObject, SIGNAL(BondsAdded(const atomId_t, const atomId_t, const GLMoleculeObject_bond::SideOfBond)), this, SLOT(bondInserted(const atomId_t, const atomId_t, const GLMoleculeObject_bond::SideOfBond)));
+    connect (atomObject, SIGNAL(BondsRemoved(const atomId_t, const atomId_t)), this, SLOT(bondRemoved(const atomId_t, const atomId_t)));
+    connect (atomObject, SIGNAL(indexChanged(GLMoleculeObject_atom*, const atomId_t, const atomId_t)), this, SLOT(changeAtomId(GLMoleculeObject_atom*, const atomId_t, const atomId_t)));
+
+    if (m_objectId  == -1)
+      setObjectId(_id);
+
+    emit changed();
+    emit changeOccured();
+  }
 }
 
