Added warning

This commit is contained in:
CommanderRedYT
2023-02-18 15:09:55 +01:00
parent de5ac4c8c2
commit 56b0fc30bb

View File

@ -1,9 +1,17 @@
#include "screenmanager.h"
// system includes
#include <cassert>
// esp-idf includes
#include <esp_log.h>
namespace espgui {
namespace {
constexpr const char * const TAG = "SCREENMANAGER";
} // namespace
std::unique_ptr<Display> currentDisplay;
std::stack<std::unique_ptr<Display>> displayStack;
@ -33,7 +41,10 @@ void popScreenImpl(TftInterface &tft)
deconstructScreen();
if (displayStack.empty())
{
ESP_LOGW(TAG, "displayStack is empty");
return;
}
currentDisplay = std::move(displayStack.top());
displayStack.pop();