diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index c8b8bcae48cfcc21856396b0da24ddeae12cf04c..c31a8321416db2e295c9680e68cad91bc32c6490 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -505,7 +505,7 @@ void LLFolderView::sanitizeSelection()
 
 		// ensure that each ancestor is open and potentially passes filtering
 		BOOL visible = false;
-		if(item->getViewModelItem())
+		if(item->getViewModelItem() != NULL)
 		{
 			visible = item->getViewModelItem()->potentiallyVisible(); // initialize from filter state for this item
 		}