Index: src/podofo/base/PdfVecObjects.cpp
===================================================================
--- src/podofo/base/PdfVecObjects.cpp	(revision 1999)
+++ src/podofo/base/PdfVecObjects.cpp	(working copy)
@@ -162,6 +162,14 @@
     return NULL;
 }
 
+PdfObject* PdfVecObjects::MustGetObject( const PdfReference & ref ) const
+{
+    PdfObject* obj = GetObject( ref );
+    if (!obj)
+        PODOFO_RAISE_ERROR( ePdfError_NoObject );
+    return obj;
+}
+
 size_t PdfVecObjects::GetIndex( const PdfReference & ref ) const
 {
     if( !m_bSorted )
Index: src/podofo/base/PdfVecObjects.h
===================================================================
--- src/podofo/base/PdfVecObjects.h	(revision 1999)
+++ src/podofo/base/PdfVecObjects.h	(working copy)
@@ -228,6 +228,15 @@
     PdfObject* GetObject( const PdfReference & ref ) const;
 
     /** Finds the object with the given reference in m_vecOffsets 
+     *  and returns a pointer to it if it is found. Throws a PdfError
+     *  exception with error code ePdfError_NoObject if no object was found
+     *  \param ref the object to be found
+     *  \returns the found object
+     *  \throws PdfError(ePdfError_NoObject)
+     */
+    PdfObject* MustGetObject( const PdfReference & ref ) const;
+
+    /** Finds the object with the given reference in m_vecOffsets
      *  and returns the index to it.
      *  \param ref the object to be found
      *  \returns the found object or NULL if no object was found.
Index: src/podofo/base/PdfWriter.cpp
===================================================================
--- src/podofo/base/PdfWriter.cpp	(revision 1999)
+++ src/podofo/base/PdfWriter.cpp	(working copy)
@@ -690,7 +690,7 @@
         // indirect as long as the PDF is not encrypted. Handle that
         // case.
         if ( idObj->IsReference() ) {
-            idObj = m_vecObjects->GetObject( idObj->GetReference() );
+            idObj = m_vecObjects->MustGetObject( idObj->GetReference() );
         }
 
         TCIVariantList it = idObj->GetArray().begin();
Index: src/podofo/doc/PdfContents.cpp
===================================================================
--- src/podofo/doc/PdfContents.cpp	(revision 1999)
+++ src/podofo/doc/PdfContents.cpp	(working copy)
@@ -67,7 +67,7 @@
     : PdfElement( inObj->GetDataType(), inObj )
 {
     if ( this->GetObject()->GetDataType() == ePdfDataType_Reference )
-        mContObj = inObj->GetOwner()->GetObject( this->GetObject()->GetReference() );
+        mContObj = inObj->GetOwner()->MustGetObject( this->GetObject()->GetReference() );
     else
         mContObj = this->GetObject();
 }
Index: src/podofo/doc/PdfDocument.cpp
===================================================================
--- src/podofo/doc/PdfDocument.cpp	(revision 1999)
+++ src/podofo/doc/PdfDocument.cpp	(working copy)
@@ -331,7 +331,7 @@
                 oss << "No page " << i << " (the first is 0) found.";
                 PODOFO_RAISE_ERROR_INFO( ePdfError_PageNotFound, oss.str() );
             }
-            PdfObject*    pObj  = m_vecObjects.GetObject( PdfReference( pPage->GetObject()->Reference().ObjectNumber() + difference, pPage->GetObject()->Reference().GenerationNumber() ) );
+            PdfObject*    pObj  = m_vecObjects.MustGetObject( PdfReference( pPage->GetObject()->Reference().ObjectNumber() + difference, pPage->GetObject()->Reference().GenerationNumber() ) );
             if( pObj->IsDictionary() && pObj->GetDictionary().HasKey( "Parent" ) )
                 pObj->GetDictionary().RemoveKey( "Parent" );
 
@@ -363,7 +363,7 @@
                 pRoot = pRoot->Next();
             
             PdfReference ref( pAppendRoot->First()->GetObject()->Reference().ObjectNumber() + difference, pAppendRoot->First()->GetObject()->Reference().GenerationNumber() );
-            pRoot->InsertChild( new PdfOutlines( m_vecObjects.GetObject( ref ) ) );
+            pRoot->InsertChild( new PdfOutlines( m_vecObjects.MustGetObject( ref ) ) );
         }
     }
     
@@ -426,7 +426,7 @@
         }
 
         PdfPage*      pPage = rDoc.GetPage( i );
-        PdfObject*    pObj  = m_vecObjects.GetObject( PdfReference( pPage->GetObject()->Reference().ObjectNumber() + difference, pPage->GetObject()->Reference().GenerationNumber() ) );
+        PdfObject*    pObj  = m_vecObjects.MustGetObject( PdfReference( pPage->GetObject()->Reference().ObjectNumber() + difference, pPage->GetObject()->Reference().GenerationNumber() ) );
         if( pObj->IsDictionary() && pObj->GetDictionary().HasKey( "Parent" ) )
             pObj->GetDictionary().RemoveKey( "Parent" );
 
@@ -458,7 +458,7 @@
 	    pRoot = pRoot->Next();
     
         PdfReference ref( pAppendRoot->First()->GetObject()->Reference().ObjectNumber() + difference, pAppendRoot->First()->GetObject()->Reference().GenerationNumber() );
-        pRoot->InsertChild( new PdfOutlines( m_vecObjects.GetObject( ref ) ) );
+        pRoot->InsertChild( new PdfOutlines( m_vecObjects.MustGetObject( ref ) ) );
     }
     
     // TODO: merge name trees
@@ -486,7 +486,7 @@
 {
     // TODO: remove unused objects: page, ...
 
-    PdfObject*    pObj  = m_vecObjects.GetObject( PdfReference( pPage->GetObject()->Reference().ObjectNumber() + difference, pPage->GetObject()->Reference().GenerationNumber() ) );
+    PdfObject*    pObj  = m_vecObjects.MustGetObject( PdfReference( pPage->GetObject()->Reference().ObjectNumber() + difference, pPage->GetObject()->Reference().GenerationNumber() ) );
     PdfRect       box  = pPage->GetMediaBox();
 
     // intersect with crop-box
Index: src/podofo/doc/PdfEncodingObjectFactory.cpp
===================================================================
--- src/podofo/doc/PdfEncodingObjectFactory.cpp	(revision 1999)
+++ src/podofo/doc/PdfEncodingObjectFactory.cpp	(working copy)
@@ -56,7 +56,7 @@
     if (pObject->IsReference ())
     {
         // resolve any references
-        pObject = pObject->GetOwner ()->GetObject (pObject->GetReference ());
+        pObject = pObject->GetOwner ()->MustGetObject (pObject->GetReference ());
     }
 
     if (pObject->IsName ())
Index: src/podofo/doc/PdfFontMetricsObject.cpp
===================================================================
--- src/podofo/doc/PdfFontMetricsObject.cpp	(revision 1999)
+++ src/podofo/doc/PdfFontMetricsObject.cpp	(working copy)
@@ -120,7 +120,7 @@
 					// Make sure array referenced is available:
 					second->DelayedStreamLoad();
 					// second do not have an associated owner; use the one in pw
-					second = pw->GetOwner()->GetObject(second->GetReference());
+					second = pw->GetOwner()->MustGetObject(second->GetReference());
 					PODOFO_ASSERT (!second->IsNull());
 				}
 				if (second->IsArray()) {
Index: src/podofo/doc/PdfOutlines.cpp
===================================================================
--- src/podofo/doc/PdfOutlines.cpp	(revision 1999)
+++ src/podofo/doc/PdfOutlines.cpp	(working copy)
@@ -79,13 +79,13 @@
     if( this->GetObject()->GetDictionary().HasKey( "First" ) )
     {
         first    = this->GetObject()->GetDictionary().GetKey("First")->GetReference();
-        m_pFirst = new PdfOutlineItem( pObject->GetOwner()->GetObject( first ), this, NULL );
+        m_pFirst = new PdfOutlineItem( pObject->GetOwner()->MustGetObject( first ), this, NULL );
     }
 
     if( this->GetObject()->GetDictionary().HasKey( "Next" ) )
     {
         next     = this->GetObject()->GetDictionary().GetKey("Next")->GetReference();
-        PdfObject* pObj = pObject->GetOwner()->GetObject( next );
+        PdfObject* pObj = pObject->GetOwner()->MustGetObject( next );
 
         m_pNext  = new PdfOutlineItem( pObj, pParentOutline, this );
     }
