Add more assertions.master/assert
authorYann Dirson <ydirson@altern.org>
Sun, 20 Apr 2008 19:52:41 +0000 (20 21:52 +0200)
committerYann Dirson <ydirson@altern.org>
Sun, 20 Apr 2008 19:52:41 +0000 (20 21:52 +0200)
src/ui.cpp

index c14745a..1a3c31d 100644 (file)
@@ -27,7 +27,9 @@ class UIActionStateObserver : public ActionStateObserver {
 public:
   UIActionStateObserver(const UI* ui, const shared_ptr<Controller>& controller)
   : m_ui(ui)
-  , m_controller(controller.get()) { }
+  , m_controller(controller.get()) {
+    Q_ASSERT(m_controller);
+  }
   
   virtual void notifyActionStateChange(GraphicalGame::ActionState state) {
     // check that the associated controller is active