khronosfws/openmax_al/src/radio/xaradiodevice.c
changeset 52 4ce423f34688
parent 42 1fa3fb47b1e3
child 53 eabc8c503852
--- a/khronosfws/openmax_al/src/radio/xaradiodevice.c	Thu Sep 02 20:58:01 2010 +0300
+++ b/khronosfws/openmax_al/src/radio/xaradiodevice.c	Fri Sep 17 08:33:15 2010 +0300
@@ -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++)
     {