diff --git a/src/celestia/celestiacore.cpp b/src/celestia/celestiacore.cpp index 79f0dfc1..9c57cbf2 100644 --- a/src/celestia/celestiacore.cpp +++ b/src/celestia/celestiacore.cpp @@ -3267,7 +3267,7 @@ void CelestiaCore::setScriptImage(float duration, const string& filename, bool fitscreen) { - if (!image || !image->isNewImage(filename)) + if (image == nullptr || image->isNewImage(filename)) { delete image; image = new CelestiaCore::OverlayImage(filename); @@ -3290,7 +3290,7 @@ CelestiaCore::OverlayImage::OverlayImage(string f) void CelestiaCore::OverlayImage::render(float curr_time, int width, int height) { - if (!texture || (curr_time >= start + duration)) + if (texture == nullptr || (curr_time >= start + duration)) return; float xSize = texture->getWidth();