aboutsummaryrefslogtreecommitdiff
path: root/backend/ninja
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-03-18 10:28:36 +0100
committerdec05eba <dec05eba@protonmail.com>2018-03-18 10:28:45 +0100
commit2a8f23ff8aa29514d8e003ecce1808aa242af292 (patch)
tree525a18f195e421bd794d25db08004c0db93f4835 /backend/ninja
parent16ae8338d9227ba9b06694c199e7aedec11d4ef5 (diff)
Fix crash when building project with no source files
Diffstat (limited to 'backend/ninja')
-rw-r--r--backend/ninja/Ninja.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index ead91a7..044fb64 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -318,7 +318,7 @@ namespace backend
else
{
const PkgConfigFlags &pkgConfigFlag = pkgConfigFlagsResult.unwrap();
- if (!pkgConfigFlag.linkerFlags.empty())
+ if (dynamicLinkerFlagCallback && !pkgConfigFlag.linkerFlags.empty())
dynamicLinkerFlagCallback(pkgConfigFlag.linkerFlags);
if(!pkgConfigFlag.cflags.empty())
cflagsCallbackFunc(pkgConfigFlag.cflags);