From 09d5d24460ea0b0a2c56d634a8c20db660f8ad32 Mon Sep 17 00:00:00 2001 From: "caillon%returnzero.com" Date: Fri, 10 Jan 2003 06:57:26 +0000 Subject: [PATCH] 188438, Null-check the right variable. r+sr=bzbarsky --- layout/xul/base/src/nsTextBoxFrame.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layout/xul/base/src/nsTextBoxFrame.cpp b/layout/xul/base/src/nsTextBoxFrame.cpp index 4a34e815b9e7..02bf02faad49 100644 --- a/layout/xul/base/src/nsTextBoxFrame.cpp +++ b/layout/xul/base/src/nsTextBoxFrame.cpp @@ -199,17 +199,18 @@ nsTextBoxFrame::AlwaysAppendAccessKey() { if (!gAccessKeyPrefInitialized) { + gAccessKeyPrefInitialized = PR_TRUE; + nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID); - gAccessKeyPrefInitialized = PR_TRUE; if (prefBranch) { nsCOMPtr prefValue; prefBranch->GetComplexValue("intl.menuitems.alwaysappendacceskeys", NS_GET_IID(nsIPrefLocalizedString), getter_AddRefs(prefValue)); - if (prefBranch) + if (prefValue) { nsXPIDLString prefString; prefValue->ToString(getter_Copies(prefString));