Index: /trunk/src/VBox/Main/src-client/GuestFileImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestFileImpl.cpp	(revision 49609)
+++ /trunk/src/VBox/Main/src-client/GuestFileImpl.cpp	(revision 49610)
@@ -57,4 +57,5 @@
     HRESULT init(GuestFile *pFile)
     {
+        AssertPtrReturn(pFile, E_POINTER);
         mFile = pFile;
         return S_OK;
@@ -63,5 +64,5 @@
     void uninit(void)
     {
-        mFile.setNull();
+        mFile = NULL;
     }
 
@@ -75,5 +76,5 @@
             case VBoxEventType_OnGuestFileWrite:
             {
-                Assert(!mFile.isNull());
+                AssertPtrReturn(mFile, E_POINTER);
                 int rc2 = mFile->signalWaitEvent(aType, aEvent);
 #ifdef DEBUG_andy
@@ -94,5 +95,5 @@
 private:
 
-    ComObjPtr<GuestFile> mFile;
+    GuestFile *mFile;
 };
 typedef ListenerImpl<GuestFileListener, GuestFile*> GuestFileListenerImpl;
@@ -703,6 +704,6 @@
 
 /**
- * Called by IGuestSession right before this file gets removed 
- * from the public file list. 
+ * Called by IGuestSession right before this file gets removed
+ * from the public file list.
  */
 int GuestFile::onRemove(void)
@@ -714,5 +715,5 @@
     int vrc = VINF_SUCCESS;
 
-    /* 
+    /*
      * Note: The event source stuff holds references to this object,
      *       so make sure that this is cleaned up *before* calling uninit().
Index: /trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp	(revision 49609)
+++ /trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp	(revision 49610)
@@ -97,4 +97,5 @@
     HRESULT init(GuestProcess *pProcess)
     {
+        AssertPtrReturn(pProcess, E_POINTER);
         mProcess = pProcess;
         return S_OK;
@@ -103,5 +104,5 @@
     void uninit(void)
     {
-        mProcess.setNull();
+        mProcess = NULL;
     }
 
@@ -114,5 +115,5 @@
             case VBoxEventType_OnGuestProcessOutput:
             {
-                Assert(!mProcess.isNull());
+                AssertPtrReturn(mProcess, E_POINTER);
                 int rc2 = mProcess->signalWaitEvent(aType, aEvent);
 #ifdef DEBUG
@@ -133,5 +134,5 @@
 private:
 
-    ComObjPtr<GuestProcess> mProcess;
+    GuestProcess *mProcess;
 };
 typedef ListenerImpl<GuestProcessListener, GuestProcess*> GuestProcessListenerImpl;
Index: /trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp	(revision 49609)
+++ /trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp	(revision 49610)
@@ -97,4 +97,5 @@
     HRESULT init(GuestSession *pSession)
     {
+        AssertPtrReturn(pSession, E_POINTER);
         mSession = pSession;
         return S_OK;
@@ -103,5 +104,5 @@
     void uninit(void)
     {
-        mSession.setNull();
+        mSession = NULL;
     }
 
@@ -112,5 +113,5 @@
             case VBoxEventType_OnGuestSessionStateChanged:
             {
-                Assert(!mSession.isNull());
+                AssertPtrReturn(mSession, E_POINTER);
                 int rc2 = mSession->signalWaitEvent(aType, aEvent);
 #ifdef DEBUG_andy
@@ -131,5 +132,5 @@
 private:
 
-    ComObjPtr<GuestSession> mSession;
+    GuestSession *mSession;
 };
 typedef ListenerImpl<GuestSessionListener, GuestSession*> GuestSessionListenerImpl;
