diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp
index 33718e520d71b4c3e2595574187c22d0224c0ce7..b9a3995e25cb1c34cb49991e39b24d645ed50923 100644
--- a/indra/llvfs/lldir_win32.cpp
+++ b/indra/llvfs/lldir_win32.cpp
@@ -249,7 +249,7 @@ BOOL LLDir_Win32::getNextFileInDir(const std::string &dirname, const std::string
 	if (pathname != mCurrentDir)
 	{
 		// different dir specified, close old search
-		if (mCurrentDir[0])
+		if (!mCurrentDir.empty())
 		{
 			FindClose(mDirSearch_h);
 		}