///////////////////////////////////////////////////////////////////////////////
// MuldeR's Utilities for Qt
-// Copyright (C) 2004-2015 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2016 LoRd_MuldeR <MuldeR2@GMX.de>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
static QReadWriteLock g_resolve_lock;
static QHash<QString, LibraryItem> g_resolve_libs;
-uintptr_t MUtils::Win32Utils::resolve_helper(const QString &libraryName, const QString &functionName)
+const uintptr_t &MUtils::Win32Utils::resolve_helper(const QString &libraryName, const QString &functionName)
{
const QString libraryNameFolded = libraryName.toCaseFolded().trimmed();
const QString functionIdTrimmed = functionName.trimmed();
LibraryItem &lib = g_resolve_libs[libraryNameFolded];
if (lib.first.isNull() || (!lib.first->isLoaded()))
{
- return NULL; /*library unavailable*/
+ static const uintptr_t null = NULL;
+ return null; /*library unavailable*/
}
//Lookup the function