diff --git a/include/GameFactory.h b/include/GameFactory.h index 1da56a7..c10a0b0 100644 --- a/include/GameFactory.h +++ b/include/GameFactory.h @@ -5,6 +5,7 @@ #include #include #include +#include #include "Game.h" @@ -36,8 +37,10 @@ public: } Game* create(GameInternal* gameInternal) { - if (this->creatorFunc == nullptr) + if (this->creatorFunc == nullptr) { + throw std::runtime_error("No game implementation registered!"); return nullptr; + } Game* game = (this->creatorFunc)(); game->gameInternal = gameInternal; return game;