khronosfws/openmax_al/src/radio/xaradiodevice.c
changeset 48 a493a607b5bf
parent 33 5e8b14bae8c3
child 53 eabc8c503852
--- a/khronosfws/openmax_al/src/radio/xaradiodevice.c	Wed Aug 25 11:51:49 2010 -0500
+++ b/khronosfws/openmax_al/src/radio/xaradiodevice.c	Fri Sep 03 19:34:12 2010 -0500
@@ -17,7 +17,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <assert.h>
 #include "xaradiodevice.h"
 #include "xaradioitf.h"
 #include "xaconfigextensionsitf.h"
@@ -119,10 +118,14 @@
     }
 
     *pDevice = (XAObjectItf)&(pBaseObj->self);
-    pImpl->adaptationCtx = XARadioAdapt_Create();   
-
+    pImpl->adaptationCtx = XARadioAdapt_Create();
+    if (pImpl->adaptationCtx == NULL)
+    {
+        XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
+        DEBUG_API("<-XARadioDeviceImpl_Create With ERROR");
+        return XA_RESULT_RESOURCE_ERROR;
+    }
     XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
-
     DEBUG_API("<-XARadioDeviceImpl_Create");
     return XA_RESULT_SUCCESS;
 }
@@ -277,10 +280,6 @@
     DEBUG_API("->XARadioDeviceImpl_FreeResources");
     XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS(XATSRadio);
 
-    
-    assert( pObj && pImpl && pObj == pObj->self );
-
-
     /* free all allocated interfaces */
     for(itfIdx = 0; itfIdx < RADIO_ITFCOUNT; itfIdx++)
     {