@@ -104,19 +104,19 @@ void MSG_Delete(struct MSG_MGR *hMsgMgr)
struct WMD_DRV_INTERFACE *pIntfFxns;
DBC_Require(cRefs > 0);
- DBC_Require(MEM_IsValidHandle(pMsgMgr, MSGMGR_SIGNATURE));
GT_1trace(MSG_debugMask, GT_ENTER, "MSG_Delete: hMsgMgr: 0x%x\n",
hMsgMgr);
- pIntfFxns = pMsgMgr->pIntfFxns;
+ if (MEM_IsValidHandle(pMsgMgr, MSGMGR_SIGNATURE)) {
+ pIntfFxns = pMsgMgr->pIntfFxns;
- /* Let WMD message module destroy the MSG_MGR: */
- (*pIntfFxns->pfnMsgDelete)(hMsgMgr);
-
- if (MEM_IsValidHandle(pMsgMgr, MSGMGR_SIGNATURE))
- GT_1trace(MSG_debugMask, GT_7CLASS, "MSG_Delete: Error hMsgMgr "
- "Valid Handle: 0x%x\n", hMsgMgr);
+ /* Let WMD message module destroy the MSG_MGR: */
+ (*pIntfFxns->pfnMsgDelete)(hMsgMgr);
+ } else {
+ GT_1trace(MSG_debugMask, GT_7CLASS, "MSG_Delete: Error hMsgMgr"
+ "invalid Handle: 0x%x\n", hMsgMgr);
+ }
}
/*