Skip to content

Commit 16ed5f2

Browse files
committed
Added check to imageWindow to protect against missing cab file image
1 parent 11d17dd commit 16ed5f2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

DCCpp_Controller/gWindows.pde

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,11 @@ class ImageWindow extends Window{
247247
fill(color(200,0,0));
248248
textFont(messageFont,20);
249249
text("PLEASE SELECT CAB TO DISPLAY IMAGE",xPos+w/2,yPos+h/2);
250+
} else if(throttle.cabButton.cabImage==null){
251+
textAlign(CENTER,CENTER);
252+
fill(color(200,0,0));
253+
textFont(messageFont,20);
254+
text("NO IMAGE FILE FOUND FOR THIS CAB",xPos+w/2,yPos+h/2);
250255
} else{
251256
imageMode(CORNER);
252257
image(throttle.cabButton.cabImage,xPos,yPos,w,h);

0 commit comments

Comments
 (0)