diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index d97f3e9f2a0b1d011e903560728922745fe1932a..c4406b6efe68f237aa0739fe212fb7991d84f5e9 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -195,7 +195,7 @@ void sdlLogOutputFunc(void *userdata, int category, SDL_LogPriority priority, co
     }
 
     std::string category_str;
-    switch (priority)
+    switch (category)
     {
     case SDL_LOG_CATEGORY_APPLICATION:
         category_str = "Application";