***************
*** 1403,1411 ****
    // check data status first
    if (dataStatus != CDEV_SUCCESS) {
      // remove transaction objecyt so a group will not block
-     if (cbkobj) {
-       (*cbkobj->callbackFunction())(dataStatus, cbkobj->userarg(),
- 				    *reqObj, result);
      }
      else { 
        // use user outbound data as result code
--- 1434,1442 ----
    // check data status first
    if (dataStatus != CDEV_SUCCESS) {
      // remove transaction objecyt so a group will not block
+     // T. Straumann: added check if user supplied a callbackFunction.
+     if (cbkobj && (userFcn = cbkobj->callbackFunction()) ) {
+       (*userFcn)(dataStatus, cbkobj->userarg(), *reqObj, result);
      }
      else { 
        // use user outbound data as result code
***************
*** 1421,1429 ****
      printf("ca_array_put_callback failed\n");
  #endif
      // remove transaction objecyt so a group will not block
-     if (cbkobj) {
-       (*cbkobj->callbackFunction())(CDEV_IOFAILED, cbkobj->userarg(),
- 				    *reqObj, result);
      }
      else {
        // use user outbound data as result code
--- 1452,1460 ----
      printf("ca_array_put_callback failed\n");
  #endif
      // remove transaction objecyt so a group will not block
+     // T. Straumann: added check if user supplied a callbackFunction.
+     if (cbkobj && (userFcn = cbkobj->callbackFunction()) ) {
+       (*userFcn)(CDEV_IOFAILED, cbkobj->userarg(), *reqObj, result);
      }
      else {
        // use user outbound data as result code
