diff --git a/src/she/skia/skia_display.h b/src/she/skia/skia_display.h index 367bea733..0f4d4083b 100644 --- a/src/she/skia/skia_display.h +++ b/src/she/skia/skia_display.h @@ -20,6 +20,7 @@ class SkiaDisplay : public Display { public: SkiaDisplay(int width, int height, int scale); + bool isInitialized() const { return m_initialized; } void setSkiaSurface(SkiaSurface* surface); void resetSkiaSurface(); diff --git a/src/she/skia/skia_window_osx.mm b/src/she/skia/skia_window_osx.mm index 52d43743b..c5ee19d50 100644 --- a/src/she/skia/skia_window_osx.mm +++ b/src/she/skia/skia_window_osx.mm @@ -272,6 +272,9 @@ private: #endif void paintGC(const gfx::Rect& rect) { + if (!m_display->isInitialized()) + return; + SkiaSurface* surface = static_cast(m_display->getSurface()); const SkBitmap& bitmap = surface->bitmap();