Skip to content

Commit

Permalink
Initialized mWangSet in stampBrush and bucketFill
Browse files Browse the repository at this point in the history
  • Loading branch information
Bdtrotte committed Aug 15, 2017
1 parent d8acf51 commit 5f72b4a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/libtiled/mapreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ void MapReaderPrivate::readTilesetWangSets(Tileset &tileset)
} else if (xml.name() == QLatin1String("wangedgecolor")
|| xml.name() == QLatin1String("wangcornercolor")) {
const QXmlStreamAttributes wangColorAtts = xml.attributes();
QString name = wangColorAtts.value(QLatin1String("name")).toString();\
QString name = wangColorAtts.value(QLatin1String("name")).toString();
QColor color = wangColorAtts.value(QLatin1String("color")).toString();
int imageId = wangColorAtts.value(QLatin1String("tile")).toInt();
float probability = wangColorAtts.value(QLatin1String("probability")).toFloat();
Expand Down
1 change: 1 addition & 0 deletions src/libtiled/wangset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ WangSet::WangSet(Tileset *tileset,
mImageTileId(imageTileId),
mUniqueFullWangIdCount(0)
{
Q_ASSERT(tileset);
}

int WangSet::edgeColorCount() const
Expand Down
1 change: 1 addition & 0 deletions src/tiled/bucketfilltool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ BucketFillTool::BucketFillTool(QObject *parent)
, mLastShiftStatus(false)
, mIsRandom(false)
, mIsWangFill(false)
, mWangSet(nullptr)
, mLastRandomStatus(false)
, mStampActions(new StampActions(this))
{
Expand Down
1 change: 1 addition & 0 deletions src/tiled/stampbrush.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ StampBrush::StampBrush(QObject *parent)
, mBrushBehavior(Free)
, mIsRandom(false)
, mIsWangFill(false)
, mWangSet(nullptr)
, mStampActions(new StampActions(this))
{
connect(mStampActions->random(), &QAction::toggled, this, &StampBrush::randomChanged);
Expand Down

0 comments on commit 5f72b4a

Please sign in to comment.