diff options
-rw-r--r-- | src/libXNVCtrlAttributes/NvCtrlAttributesUtils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributesUtils.c b/src/libXNVCtrlAttributes/NvCtrlAttributesUtils.c index d358543..f20108d 100644 --- a/src/libXNVCtrlAttributes/NvCtrlAttributesUtils.c +++ b/src/libXNVCtrlAttributes/NvCtrlAttributesUtils.c @@ -491,6 +491,12 @@ static void add_target_relationships(CtrlTarget *target, int len; int i; + /* If no targets of this type exist in the system, don't bother querying + * the server about relationships. */ + if (target->system->targets[target_type] == NULL) { + return; + } + status = NvCtrlGetBinaryAttribute(target, 0, attr, (unsigned char **)(&pData), &len); if ((status != NvCtrlSuccess) || !pData) { |