NPE catched, double->single converted:
[shipsimu.git] / application / ship-simu / main / user / extended / class_ShipSimuMember.php
index fa2c0d9ae3694f3b6c69c6c7521a129626ec2f84..f0ccd90fb0cff19dcf2eabd9e8ab2354d504b6f8 100644 (file)
@@ -166,8 +166,16 @@ class ShipSimuMember extends ShipSimuBaseUser implements ManageableMember, Booka
         * @return      void
         */
        public function bookAmountDirectly (Requestable $requestInstance) {
-               // 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
+               }
 
                // Is the points instance null?
                if (is_null($pointsInstance)) {