Remove unnecessary null checks

This commit is contained in:
GriffinR 2022-10-05 11:10:38 -04:00 committed by Marcus Huderle
parent 564d24c4f3
commit e70b049887
2 changed files with 1 additions and 5 deletions

View file

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

View file

@ -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();