[aseprite] 13/64: Add a little check in DocumentApi::copyCel() in release mode
Tobias Hansen
thansen at moszumanska.debian.org
Tue Jun 21 14:43:00 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 036cb8b5234bead0f479b87eb1c3d81a0f5edf94
Author: David Capello <davidcapello at gmail.com>
Date: Mon May 9 15:45:59 2016 -0300
Add a little check in DocumentApi::copyCel() in release mode
---
src/app/document_api.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/app/document_api.cpp b/src/app/document_api.cpp
index 0be9db2..0d617da 100644
--- a/src/app/document_api.cpp
+++ b/src/app/document_api.cpp
@@ -1,5 +1,5 @@
// Aseprite
-// Copyright (C) 2001-2015 David Capello
+// Copyright (C) 2001-2016 David Capello
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -368,6 +368,10 @@ void DocumentApi::copyCel(
LayerImage* dstLayer, frame_t dstFrame, bool continuous)
{
ASSERT(srcLayer != dstLayer || srcFrame != dstFrame);
+
+ if (srcLayer == dstLayer && srcFrame == dstFrame)
+ return; // Nothing to be done
+
m_transaction.execute(
new cmd::CopyCel(
srcLayer, srcFrame,
--
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