0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 21:23:41 +00:00

Compare commits

..

1 Commits

View File

@ -5,7 +5,6 @@
#include <map>
#include <functional>
#include <string>
#include <stdexcept>
#include "Game.h"
@ -37,10 +36,8 @@ public:
}
Game* create(GameInternal* gameInternal) {
if (this->creatorFunc == nullptr) {
throw std::runtime_error("No game implementation registered!");
if (this->creatorFunc == nullptr)
return nullptr;
}
Game* game = (this->creatorFunc)();
game->gameInternal = gameInternal;
return game;