summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/browserbox_unittest.cc7
-rw-r--r--src/gui/widgets/widget.h3
2 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/widgets/browserbox_unittest.cc b/src/gui/widgets/browserbox_unittest.cc
index 3978c309d..a3434427f 100644
--- a/src/gui/widgets/browserbox_unittest.cc
+++ b/src/gui/widgets/browserbox_unittest.cc
@@ -30,6 +30,7 @@
#include "gui/widgets/browserbox.h"
+#include "utils/delete2.h"
#include "utils/virtfs.h"
#include "render/sdlgraphics.h"
@@ -170,8 +171,10 @@ TEST_CASE("BrowserBox tests", "browserbox")
row = "##1%%2";
box->addRow(row);
+ delete Widget::getGloablFont();
+ Widget::setGlobalFont(nullptr);
delete box;
- delete client;
- client = nullptr;
+ delete2(client);
+ delete2(logger);
// VirtFs::deinit();
}
diff --git a/src/gui/widgets/widget.h b/src/gui/widgets/widget.h
index 4a9957738..92b345cea 100644
--- a/src/gui/widgets/widget.h
+++ b/src/gui/widgets/widget.h
@@ -641,6 +641,9 @@ class Widget notfinal : public Widget2
*/
static void setGlobalFont(Font *const font);
+ static Font *getGloablFont()
+ { return mGlobalFont; }
+
/**
* Sets the font for the widget. If NULL is passed, the global font
* will be used.