Read the preferences upon initialization for the show/hide pictures

Forgot to add this one.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It's safe to delete NULL pointers

Small code cleanup, it's safe to delete null pointers.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: fix calculation when it is safe to surface

We were comparing with a negative depth which apparently confused the
algorithm.

Fixes #611

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>