baseport: Error contrast codes.
authorSeungBeom Kim <sbcrux.kim@samsung.com>
Mon, 18 Feb 2013 05:03:19 +0000 (14:03 +0900)
committerSeungBeom Kim <sbcrux.kim@samsung.com>
Mon, 18 Feb 2013 05:04:00 +0000 (14:04 +0900)
Add NULL pointer check before buffer return.

Change-Id: I7a171150f31c3518c7bf4142aac59a11b103874d
Signed-off-by: SeungBeom Kim <sbcrux.kim@samsung.com>
component/common/Exynos_OMX_Baseport.c

index 34baed2f09788bc26fc52df18c29a32c92a75c51..0650d709590d5222e207828724d1b5b7e192ed08 100644 (file)
@@ -58,9 +58,10 @@ OMX_ERRORTYPE Exynos_OMX_InputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent, OMX
             break;
         }
     }
-
     Exynos_OSAL_MutexUnlock(pExynosPort->hPortMutex);
-    pExynosComponent->pCallbacks->EmptyBufferDone(pOMXComponent, pExynosComponent->callbackData, bufferHeader);
+
+    if ((bufferHeader != NULL) && (bufferHeader->pBuffer != NULL))
+        pExynosComponent->pCallbacks->EmptyBufferDone(pOMXComponent, pExynosComponent->callbackData, bufferHeader);
 
     return ret;
 }
@@ -79,9 +80,10 @@ OMX_ERRORTYPE Exynos_OMX_OutputBufferReturn(OMX_COMPONENTTYPE *pOMXComponent, OM
             break;
         }
     }
-
     Exynos_OSAL_MutexUnlock(pExynosPort->hPortMutex);
-    pExynosComponent->pCallbacks->FillBufferDone(pOMXComponent, pExynosComponent->callbackData, bufferHeader);
+
+    if ((bufferHeader != NULL) && (bufferHeader->pBuffer != NULL))
+        pExynosComponent->pCallbacks->FillBufferDone(pOMXComponent, pExynosComponent->callbackData, bufferHeader);
 
     return ret;
 }