diff --git a/src/window/Window.cpp b/src/window/Window.cpp index 603acc57..7336bd68 100644 --- a/src/window/Window.cpp +++ b/src/window/Window.cpp @@ -709,10 +709,6 @@ double Window::getFrameDurationRemaining() { std::shared_ptr Window::loadFont(const std::string& filename) { - // HACK If ModuleWidgets call loadFont() in their constructor, APP->window might be null. - if (!this) - return NULL; - const auto& pair = internal->fontCache.find(filename); if (pair != internal->fontCache.end()) return pair->second; @@ -733,10 +729,6 @@ std::shared_ptr Window::loadFont(const std::string& filename) { std::shared_ptr Window::loadImage(const std::string& filename) { - // HACK If ModuleWidgets call loadFont() in their constructor, APP->window might be null. - if (!this) - return NULL; - const auto& pair = internal->imageCache.find(filename); if (pair != internal->imageCache.end()) return pair->second;