mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-30 04:20:23 +00:00
Fix crash dragging files on timeline in certain cases (fix #4801)
With the combination of 8b0b1d8d1e2624eaa8433df58b83845902cd7975 (allowing transactions in docs without context) and be17c4832405be44193a4d24268c38da80369743 (getting the active DocRange from Doc context), we were getting a crash accessing a nullptr context.
This commit is contained in:
parent
b03dffb5cd
commit
8c55c1db07
2
laf
2
laf
@ -1 +1 @@
|
||||
Subproject commit 370ab278567c97d9ee067b71437ee7fba0022ab6
|
||||
Subproject commit 631bc339fa7a4b5adb9c4caee5b07dac18f2219a
|
@ -129,12 +129,14 @@ SpritePosition CmdTransaction::calcSpritePosition() const
|
||||
|
||||
bool CmdTransaction::isDocRangeEnabled() const
|
||||
{
|
||||
return context()->range().enabled();
|
||||
return (context() ? context()->range().enabled():
|
||||
false);
|
||||
}
|
||||
|
||||
view::RealRange CmdTransaction::calcDocRange() const
|
||||
{
|
||||
return context()->range();
|
||||
return (context() ? context()->range():
|
||||
view::RealRange());
|
||||
}
|
||||
|
||||
} // namespace app
|
||||
|
Loading…
x
Reference in New Issue
Block a user