sonata-project/SonataAdminBundle — comment on commit 32d59e6c2f017bef0eab145ac621e3e35b8609e2
File: Admin/Admin.php line 1055
By schmittjoh:

$object !== $admin->getSubject() should do the same.