mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-21 12:40:34 +00:00
Fix crash displaying the Preview window in multiple windows (fix #4864)
We were using a backLayer with a nullptr surface.
This commit is contained in:
parent
c6a1a6868a
commit
2e13559bbb
@ -44,6 +44,9 @@ Display::Display(Display* parentDisplay,
|
||||
m_containedWidget->type() == kWindowWidget);
|
||||
#endif
|
||||
m_dirtyRegion = bounds();
|
||||
|
||||
// Configure the back layer surface.
|
||||
configureBackLayer();
|
||||
}
|
||||
|
||||
os::SurfaceRef Display::nativeSurface() const
|
||||
|
@ -353,7 +353,7 @@ void View::onSetViewScroll(const gfx::Point& pt)
|
||||
// scrolled region (which is inverse to the scroll position
|
||||
// delta/movement).
|
||||
const Point delta = oldScroll - newScroll;
|
||||
if (!display->nativeWindow()->gpuAcceleration()) {
|
||||
if (display && !display->nativeWindow()->gpuAcceleration()) {
|
||||
// The movable region includes the given "validRegion"
|
||||
// intersecting itself when it's in the new position, so we don't
|
||||
// overlap regions outside the "validRegion".
|
||||
|
Loading…
x
Reference in New Issue
Block a user