- // Get the points class from registry
- $pointsInstance = Registry::getRegistry()->getInstance('points');
+ // Init points instance
+ $pointsInstance = null;
+
+ try {
+ // Get the points class from registry
+ $pointsInstance = Registry::getRegistry()->getInstance('points');
+ } catch (NullPointerException $e) {
+ // Instance not found in registry
+ // @TODO We should log this later
+ }