Move null check directly to GrowlManager::notify() to be safe for future changes

Ansariel 2015-03-10 21:53:31 +01:00
parent 1b9253d1d3
commit e97f84e504
2 changed files with 6 additions and 1 deletions

View File

@ -139,7 +139,7 @@ void FSKeywords::notify(const LLChat& chat)
}
static LLCachedControl<bool> FSEnableGrowl(gSavedSettings, "FSEnableGrowl");
if (FSEnableGrowl && gGrowlManager)
if (FSEnableGrowl)
{
std::string msg = chat.mFromName;
std::string prefix = chat.mText.substr(0, 4);

View File

@ -219,6 +219,11 @@ void GrowlManager::loadConfig()
void GrowlManager::notify(const std::string& notification_title, const std::string& notification_message, const std::string& notification_type)
{
if (!gGrowlManager || !mNotifier)
{
return;
}
static LLCachedControl<bool> enabled(gSavedSettings, "FSEnableGrowl");
if (!enabled)
{