Remove unnecessary null checks
This commit is contained in:
parent
564d24c4f3
commit
e70b049887
2 changed files with 1 additions and 5 deletions
|
@ -23,8 +23,7 @@ QImage getMetatileImage(
|
|||
bool useTruePalettes)
|
||||
{
|
||||
Metatile* metatile = Tileset::getMetatile(metatileId, primaryTileset, secondaryTileset);
|
||||
Tileset* blockTileset = Tileset::getMetatileTileset(metatileId, primaryTileset, secondaryTileset);
|
||||
if (!metatile || !blockTileset) {
|
||||
if (!metatile) {
|
||||
QImage metatile_image(16, 16, QImage::Format_RGBA8888);
|
||||
metatile_image.fill(Qt::magenta);
|
||||
return metatile_image;
|
||||
|
|
|
@ -52,9 +52,6 @@ QImage TilesetEditorMetatileSelector::buildImage(int metatileIdStart, int numMet
|
|||
}
|
||||
|
||||
void TilesetEditorMetatileSelector::draw() {
|
||||
if (!this->primaryTileset || !this->secondaryTileset) {
|
||||
this->setPixmap(QPixmap());
|
||||
}
|
||||
this->setPixmap(QPixmap::fromImage(this->buildAllMetatilesImage()));
|
||||
this->drawSelection();
|
||||
|
||||
|
|
Loading…
Reference in a new issue