Files
ladybird/Widgets/AbstractScreen.cpp
Andreas Kling d1ceb4b603 Fix uninitialized AbstractScreen instance pointer.
...yeah yeah, one day I'm gonna zero out the kernel's BSS segment. Soon..
2019-01-11 01:43:41 +01:00

33 lines
502 B
C++

#include "AbstractScreen.h"
#include "EventLoop.h"
#include "Event.h"
#include "Widget.h"
#include <AK/Assertions.h>
static AbstractScreen* s_the;
void AbstractScreen::initialize()
{
s_the = nullptr;
}
AbstractScreen& AbstractScreen::the()
{
ASSERT(s_the);
return *s_the;
}
AbstractScreen::AbstractScreen(unsigned width, unsigned height)
: Object(nullptr)
, m_width(width)
, m_height(height)
{
ASSERT(!s_the);
s_the = this;
}
AbstractScreen::~AbstractScreen()
{
}