Fix overlay image replacement and style cleanups

pull/3/head
Hleb Valoshka 2019-07-20 15:39:13 +03:00
parent 9fe2198ebb
commit ba0b39fdff
1 changed files with 2 additions and 2 deletions

View File

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