diff --git a/src/libtiled/mapreader.cpp b/src/libtiled/mapreader.cpp index 4abead2194..cc0b139ba7 100644 --- a/src/libtiled/mapreader.cpp +++ b/src/libtiled/mapreader.cpp @@ -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(); diff --git a/src/libtiled/wangset.cpp b/src/libtiled/wangset.cpp index 63e154c5ab..63184daabf 100644 --- a/src/libtiled/wangset.cpp +++ b/src/libtiled/wangset.cpp @@ -315,6 +315,7 @@ WangSet::WangSet(Tileset *tileset, mImageTileId(imageTileId), mUniqueFullWangIdCount(0) { + Q_ASSERT(tileset); } int WangSet::edgeColorCount() const diff --git a/src/tiled/bucketfilltool.cpp b/src/tiled/bucketfilltool.cpp index 10d79d77bd..d95044f33c 100644 --- a/src/tiled/bucketfilltool.cpp +++ b/src/tiled/bucketfilltool.cpp @@ -53,6 +53,7 @@ BucketFillTool::BucketFillTool(QObject *parent) , mLastShiftStatus(false) , mIsRandom(false) , mIsWangFill(false) + , mWangSet(nullptr) , mLastRandomStatus(false) , mStampActions(new StampActions(this)) { diff --git a/src/tiled/stampbrush.cpp b/src/tiled/stampbrush.cpp index 2f6e91b340..ed200ea64d 100644 --- a/src/tiled/stampbrush.cpp +++ b/src/tiled/stampbrush.cpp @@ -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);