Permalink
Browse files

Check if we actually need to hide widgets before hiding them

  • Loading branch information...
1 parent 32a7fe7 commit 91853401ad55299c6f6f057e99fd1293834a15e3 @vexed vexed committed Feb 3, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/multiint.cpp
View
10 src/multiint.cpp
@@ -1252,11 +1252,11 @@ static void hidePasswordForm(void)
{
EnablePasswordPrompt = false;
- widgHide(psWScreen, FRONTEND_PASSWORDFORM);
- widgHide(psWScreen, CON_PASSWORD_LABEL);
- widgHide(psWScreen, CON_PASSWORD);
- widgHide(psWScreen, CON_PASSWORDYES);
- widgHide(psWScreen, CON_PASSWORDNO);
+ if (widgGetFromID(psWScreen, FRONTEND_PASSWORDFORM)) widgHide(psWScreen, FRONTEND_PASSWORDFORM);
+ if (widgGetFromID(psWScreen, CON_PASSWORD_LABEL)) widgHide(psWScreen, CON_PASSWORD_LABEL);
+ if (widgGetFromID(psWScreen, CON_PASSWORD)) widgHide(psWScreen, CON_PASSWORD);
+ if (widgGetFromID(psWScreen, CON_PASSWORDYES))widgHide(psWScreen, CON_PASSWORDYES);
+ if (widgGetFromID(psWScreen, CON_PASSWORDNO)) widgHide(psWScreen, CON_PASSWORDNO);
widgReveal(psWScreen, FRONTEND_SIDETEXT);
widgReveal(psWScreen, FRONTEND_BOTFORM);

0 comments on commit 9185340

Please sign in to comment.