aboutsummaryrefslogtreecommitdiff
path: root/src/ui/host
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-10-26 19:22:08 +0800
committercrupest <crupest@outlook.com>2021-10-26 19:22:08 +0800
commit395c5aa302518af0d9f66dfafc910b3eab88742d (patch)
tree5fa452058f5650fc62c37d0f435b8914c5b1aac5 /src/ui/host
parent253341d93d8e3cb38a204b539822ca1cc8597754 (diff)
downloadcru-395c5aa302518af0d9f66dfafc910b3eab88742d.tar.gz
cru-395c5aa302518af0d9f66dfafc910b3eab88742d.tar.bz2
cru-395c5aa302518af0d9f66dfafc910b3eab88742d.zip
...
Diffstat (limited to 'src/ui/host')
-rw-r--r--src/ui/host/WindowHost.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ui/host/WindowHost.cpp b/src/ui/host/WindowHost.cpp
index e24a883f..f60e2809 100644
--- a/src/ui/host/WindowHost.cpp
+++ b/src/ui/host/WindowHost.cpp
@@ -205,6 +205,7 @@ void WindowHost::Relayout(const Size& available_size) {
}
void WindowHost::Repaint() {
+ if (native_window_ == nullptr) return;
auto painter = native_window_->BeginPaint();
painter->Clear(colors::white);
root_render_object_->Draw(painter.get());