Fix crash on shortcut launch if PC has no known MAC address

This commit is contained in:
Cameron Gutman
2022-06-18 10:23:06 -05:00
parent b16676b54a
commit d6211605a1

View File

@@ -83,7 +83,7 @@ public class ShortcutTrampoline extends Activity {
}
// Try to wake the target PC if it's offline (up to some retry limit)
if (details.state == ComputerDetails.State.OFFLINE && --wakeHostTries >= 0) {
if (details.state == ComputerDetails.State.OFFLINE && details.macAddress != null && --wakeHostTries >= 0) {
try {
// Make a best effort attempt to wake the target PC
WakeOnLanSender.sendWolPacket(computer);