Check if device is opened before trying to create image handler.

Change-Id: I60f1f6890fdd73e489da4aab9928370163f55f58
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: aavit <eirik.aavitsland@digia.com>