wmppp.app: Fix segfault if stop_action or start_action strings are NULL.

This commit is contained in:
Doug Torrance 2015-05-19 22:31:07 -05:00 committed by Carlos R. Mafra
parent 37acf2a687
commit 540b8ac560

View file

@ -637,7 +637,8 @@ void wmppp_routine(int argc, char **argv) {
if (!starttime) { if (!starttime) {
copyXPMArea(28, 95, 25, 11, 5, 48); copyXPMArea(28, 95, 25, 11, 5, 48);
DrawTime(0, 1); DrawTime(0, 1);
start_child = execCommand(start_action); if (start_action)
start_child = execCommand(start_action);
SetWaitLED(LED_PPP_POWER); SetWaitLED(LED_PPP_POWER);
waittime = ORANGE_LED_TIMEOUT + currenttime; waittime = ORANGE_LED_TIMEOUT + currenttime;
} }
@ -645,7 +646,8 @@ void wmppp_routine(int argc, char **argv) {
break; break;
case 1: case 1:
if (stop_child == 0) { if (stop_child == 0) {
stop_child = execCommand(stop_action); if (stop_action)
stop_child = execCommand(stop_action);
} }
break; break;
} }