Test if it's valid before showing:
```
ep  1 18:21:07 tanghus ownCloud[20634]: PHP Warning:  imagedestroy() expects parameter 1 to be resource, boolean given in /home/tol/owncloud/core/lib/image.php on line 839
Sep  1 18:21:07 tanghus ownCloud[20634]: PHP Stack trace:
Sep  1 18:21:07 tanghus ownCloud[20634]: PHP   1. {main}() /home/tol/owncloud/core/index.php:0
Sep  1 18:21:07 tanghus ownCloud[20634]: PHP   2. OC::handleRequest() /home/tol/owncloud/core/index.php:30
Sep  1 18:21:07 tanghus ownCloud[20634]: PHP   3. OC_Router->match() /home/tol/owncloud/core/lib/base.php:637
Sep  1 18:21:07 tanghus ownCloud[20634]: PHP   4. call_user_func() /home/tol/owncloud/core/lib/router.php:127
Sep  1 18:21:07 tanghus ownCloud[20634]: PHP   5. OC_Core_Avatar_Controller::postCroppedAvatar() /home/tol/owncloud/core/lib/router.php:127
Sep  1 18:21:07 tanghus ownCloud[20634]: PHP   6. OC_Image->crop() /home/tol/owncloud/core/core/avatar/controller.php:105
Sep  1 18:21:07 tanghus ownCloud[20634]: PHP   7. imagedestroy() /home/tol/owncloud/core/lib/image.php:839
```