[aseprite] 254/308: Fix crash creating a custom brush without "Type" option and restarting

Tobias Hansen thansen at moszumanska.debian.org
Tue Mar 8 02:45:17 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 55f60be79a1170b7663c1e9d1ebd94eef6fa3a6d
Author: David Capello <davidcapello at gmail.com>
Date:   Tue Feb 23 18:06:19 2016 -0300

    Fix crash creating a custom brush without "Type" option and restarting
---
 src/app/app_brushes.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/app/app_brushes.cpp b/src/app/app_brushes.cpp
index 4b6c76a..f308d52 100644
--- a/src/app/app_brushes.cpp
+++ b/src/app/app_brushes.cpp
@@ -310,7 +310,7 @@ void AppBrushes::load(const std::string& filename)
       if (angle) flags |= int(BrushSlot::Flags::BrushAngle);
       brush.reset(
         new Brush(
-          string_id_to_brush_type(type),
+          (type ? string_id_to_brush_type(type): kFirstBrushType),
           (size ? base::convert_to<int>(std::string(size)): 1),
           (angle ? base::convert_to<int>(std::string(angle)): 0)));
     }

-- 
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