ActiveAE: verify resample context before using it
Merge pull request #4510 from FernetMenta/aefixes

ActiveAE: verify resample context before using it