Since d is allocated in the ctor with new its existance is guarenteed and
From: Erik Hovland <erik@hovland.org>
we don't need to check for null.
---
libs/libmyth/mythcontext.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/libmyth/mythcontext.cpp b/libs/libmyth/mythcontext.cpp
index 891c237..6efaa59 100644
a
|
b
|
QString MythContext::GetSetting(const QString &key, const QString &defaultval) |
2664 | 2664 | bool found = false; |
2665 | 2665 | QString value; |
2666 | 2666 | |
2667 | | if (d && d->overriddenSettings.contains(key)) { |
| 2667 | if (d->overriddenSettings.contains(key)) { |
2668 | 2668 | value = d->overriddenSettings[key]; |
2669 | 2669 | return value; |
2670 | 2670 | } |
2671 | 2671 | |
2672 | | if (d && d->useSettingsCache) |
| 2672 | if (d->useSettingsCache) |
2673 | 2673 | { |
2674 | 2674 | d->settingsCacheLock.lock(); |
2675 | 2675 | if (d->settingsCache.contains(key)) |
… |
… |
QString MythContext::GetSetting(const QString &key, const QString &defaultval) |
2721 | 2721 | if (!found) |
2722 | 2722 | value = d->m_settings->GetSetting(key, defaultval); |
2723 | 2723 | |
2724 | | if (!value.isNull() && d && d->useSettingsCache) |
| 2724 | if (!value.isNull() && d->useSettingsCache) |
2725 | 2725 | { |
2726 | 2726 | d->settingsCacheLock.lock(); |
2727 | 2727 | d->settingsCache[key] = value; |