Browse Source

Falling back on default image if the Picture is clickable without a pressed image.

David Piuva 4 years ago
parent
commit
d8da17674f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/DFPSR/gui/components/Picture.cpp

+ 1 - 1
Source/DFPSR/gui/components/Picture.cpp

@@ -58,7 +58,7 @@ bool Picture::isContainer() const {
 void Picture::drawSelf(ImageRgbaU8& targetImage, const IRect &relativeLocation) {
 void Picture::drawSelf(ImageRgbaU8& targetImage, const IRect &relativeLocation) {
 	if (image_exists(this->image.value)) {
 	if (image_exists(this->image.value)) {
 		this->generateGraphics();
 		this->generateGraphics();
-		draw_alphaFilter(targetImage, (this->pressed && this->inside) ? this->finalImagePressed : this->finalImage, relativeLocation.left(), relativeLocation.top());
+		draw_alphaFilter(targetImage, (this->pressed && this->inside && image_exists(this->finalImagePressed)) ? this->finalImagePressed : this->finalImage, relativeLocation.left(), relativeLocation.top());
 	}
 	}
 }
 }