git-gui: avoid an error message when removing the last remote

When the last remote is removed on a system that has tearoff menu items
the code that adjusts the fetch and prune menus may raise an error when
probing the menu entry for a non-existing -label option.
Check the entry type to avoid this fault.

Reported-by: Vedran Miletić <>
Signed-off-by: Pat Thoyts <>
1 file changed