make sure ptr<> is called with proper parameter, otherwise the assertion fails
Merge pull request #3234 from vpisarev:fixed_photo_test_failure