From c07901e29ed545bbb02e3bddf148fe1104b94e9f Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:56 -0500 Subject: Second Life viewer sources 1.15.1.3 --- linden/indra/newview/llpanelface.cpp | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'linden/indra/newview/llpanelface.cpp') diff --git a/linden/indra/newview/llpanelface.cpp b/linden/indra/newview/llpanelface.cpp index 8f24c55..9cbfdc2 100644 --- a/linden/indra/newview/llpanelface.cpp +++ b/linden/indra/newview/llpanelface.cpp @@ -505,7 +505,16 @@ void LLPanelFace::getState() { F32 shinyf = 0.f; identical = allFacesSameValue( &LLPanelFace::valueShiny, &shinyf ); - childGetSelectionInterface("combobox shininess")->selectNthItem((S32)shinyf); + LLCtrlSelectionInterface* combobox_shininess = + childGetSelectionInterface("combobox shininess"); + if (combobox_shininess) + { + combobox_shininess->selectNthItem((S32)shinyf); + } + else + { + llwarns << "failed childGetSelectionInterface for 'combobox shininess'" << llendl; + } childSetEnabled("combobox shininess",editable); childSetTentative("combobox shininess",!identical); childSetEnabled("label shininess",editable); @@ -514,7 +523,16 @@ void LLPanelFace::getState() { F32 bumpf = 0.f; identical = allFacesSameValue( &LLPanelFace::valueBump, &bumpf ); - childGetSelectionInterface("combobox bumpiness")->selectNthItem((S32)bumpf); + LLCtrlSelectionInterface* combobox_bumpiness = + childGetSelectionInterface("combobox bumpiness"); + if (combobox_bumpiness) + { + combobox_bumpiness->selectNthItem((S32)bumpf); + } + else + { + llwarns << "failed childGetSelectionInterface for 'combobox bumpiness'" << llendl; + } childSetEnabled("combobox bumpiness",editable); childSetTentative("combobox bumpiness",!identical); childSetEnabled("label bumpiness",editable); @@ -523,8 +541,17 @@ void LLPanelFace::getState() { F32 genf = 0.f; identical = allFacesSameValue( &LLPanelFace::valueTexGen, &genf); - S32 selected_texgen = ((S32) genf) >> TEM_TEX_GEN_SHIFT; - childGetSelectionInterface("combobox texgen")->selectNthItem(selected_texgen); + S32 selected_texgen = ((S32) genf) >> TEM_TEX_GEN_SHIFT; + LLCtrlSelectionInterface* combobox_texgen = + childGetSelectionInterface("combobox texgen"); + if (combobox_texgen) + { + combobox_texgen->selectNthItem(selected_texgen); + } + else + { + llwarns << "failed childGetSelectionInterface for 'combobox texgen'" << llendl; + } childSetEnabled("combobox texgen",editable); childSetTentative("combobox texgen",!identical); childSetEnabled("tex gen",editable); -- cgit v1.1