mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 15:32:38 +00:00
Fix crash using an non-fully initialized SkiaDisplay on SkiaWindow::Impl::paintGC() on OS X
This commit is contained in:
parent
2636401c1c
commit
99d7eb5391
@ -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();
|
||||
|
||||
|
@ -272,6 +272,9 @@ private:
|
||||
#endif
|
||||
|
||||
void paintGC(const gfx::Rect& rect) {
|
||||
if (!m_display->isInitialized())
|
||||
return;
|
||||
|
||||
SkiaSurface* surface = static_cast<SkiaSurface*>(m_display->getSurface());
|
||||
const SkBitmap& bitmap = surface->bitmap();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user