[aseprite] 15/64: Fix crash creating a new brush from an empty cel using right-click
Tobias Hansen
thansen at moszumanska.debian.org
Tue Jun 21 14:43:01 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit 2d632339e031fe0609e930c91d826119c69f85d4
Author: David Capello <davidcapello at gmail.com>
Date: Mon May 9 15:53:55 2016 -0300
Fix crash creating a new brush from an empty cel using right-click
---
src/app/commands/cmd_new_brush.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/app/commands/cmd_new_brush.cpp b/src/app/commands/cmd_new_brush.cpp
index 70286bb..a69b5bf 100644
--- a/src/app/commands/cmd_new_brush.cpp
+++ b/src/app/commands/cmd_new_brush.cpp
@@ -115,9 +115,11 @@ void NewBrushCommand::onQuickboxEnd(Editor* editor, const gfx::Rect& rect, ui::M
if (buttons & ui::kButtonRight) {
try {
ContextWriter writer(UIContext::instance(), 250);
- Transaction transaction(writer.context(), "Clear");
- transaction.execute(new cmd::ClearRect(writer.cel(), rect));
- transaction.commit();
+ if (writer.cel()) {
+ Transaction transaction(writer.context(), "Clear");
+ transaction.execute(new cmd::ClearRect(writer.cel(), rect));
+ transaction.commit();
+ }
}
catch (const std::exception& ex) {
Console::showException(ex);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list