Skip to content

Commit bc20872

Browse files
committed
fix bug when no patch selected
1 parent fd647bb commit bc20872

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

patch-menu

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ yad --title="Build a Pi Patch Tool" --width=500 --height=500 \
2222
--button="Apply Patch":2)
2323
BUT=$?
2424

25+
2526
PATCH=$(echo ${INFO} | awk -F "|" '{print $1}')
2627

2728
#cleanup and exit upon user request
@@ -32,6 +33,17 @@ rm -rf $TEMP $DIR/pi-build
3233
${MYPATH}/update && exit
3334
fi
3435

36+
37+
#check to verify that a patch has been selected
38+
#Thank Ken, NB6S for catching this bug!
39+
if [ -z $INFO ]; then
40+
yad --form --width=500 --text-align=center --center --title="Build-a-Pi Patch Tool" --text-align=center \
41+
--image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \
42+
--text="<b>Please select a patch\rand try again.</b>" \
43+
--button=gtk-close
44+
MENU
45+
fi
46+
3547
#verify patch has not been applied already
3648
echo "getting patchname"
3749
PATCHNAME=$(grep PATCHNAME= $DIR/pi-build/patch/${PATCH} | sed 's/PATCHNAME=//')

0 commit comments

Comments
 (0)