diff --git a/src/she/skia/skia_window_osx.mm b/src/she/skia/skia_window_osx.mm index c5ee19d50..7ce986bc9 100644 --- a/src/she/skia/skia_window_osx.mm +++ b/src/she/skia/skia_window_osx.mm @@ -139,7 +139,7 @@ public: } #if SK_SUPPORT_GPU - if (m_glCtx) + if (m_glCtx && m_display->isInitialized()) createRenderTarget(size); #endif @@ -149,7 +149,7 @@ public: void onDrawRect(const gfx::Rect& rect) override { #if SK_SUPPORT_GPU // Flush operations to the SkCanvas - { + if (m_display->isInitialized()) { SkiaSurface* surface = static_cast(m_display->getSurface()); surface->flush(); }