[VOL-4104] openonu adapter panic OnuIndicationRequest message processing
Change-Id: I57be3248c0ba689f2b28862a0f3ca67c54f6181f
diff --git a/internal/pkg/onuadaptercore/device_handler.go b/internal/pkg/onuadaptercore/device_handler.go
index 67fccc7..15d8c4e 100644
--- a/internal/pkg/onuadaptercore/device_handler.go
+++ b/internal/pkg/onuadaptercore/device_handler.go
@@ -1672,8 +1672,9 @@
logger.Errorw(ctx, "No valid OnuDevice -aborting", log.Fields{"device-id": dh.deviceID})
return fmt.Errorf("no valid OnuDevice: %s", dh.deviceID)
}
- dh.pOnuOmciDevice.PDevOmciCC.CancelRequestMonitoring()
-
+ if pDevEntry.PDevOmciCC != nil {
+ pDevEntry.PDevOmciCC.CancelRequestMonitoring()
+ }
if includingMibSyncFsm {
pDevEntry.CancelProcessing(ctx)
}