oeed / PearOS

PearOS - OS X Inspired OS for ComputerCraft
MIT License
13 stars 7 forks source link

Dock sometimes tries to draw a nil Image... #21

Open leftshift opened 11 years ago

leftshift commented 11 years ago

Sometimes, the dock has a problem with drawing app icons, gives OSDrawing.drawImage() coordinates, but as tImage a nil. When this happens, you get a "Attempt to get length of nil" while booting. Not sure where this comes from, a quick "fix" would be to check in drawImage() if tImage is a nil and then do stuff... Still trying to find out why the dock tries to draw a nil though...

leftshift commented 11 years ago

HA! Gotcha! If the file "programname.app/icon" isn't there OR SPELLED WITH A CAPITAL I, paintutils.loadImage() doesn't get an image --> DockItem.icon is nil. Fix would be: Make OSDockitem failsafe, if no icon present, use a default AND/OR Make OSDrawing.DrawImage failsafe by doing something similar.

Still don't know how the i got a capital I though...

oeed commented 11 years ago

Yes, this is something I am aware of and will add when I have the time.