Skip to content

VCST-4632: Fix NRE when resolving empty brands catalog#86

Open
ksavosteev wants to merge 1 commit intodevfrom
fix/VCST-4632
Open

VCST-4632: Fix NRE when resolving empty brands catalog#86
ksavosteev wants to merge 1 commit intodevfrom
fix/VCST-4632

Conversation

@ksavosteev
Copy link
Collaborator

@ksavosteev ksavosteev commented Feb 17, 2026

Description

References

QA-test:

Jira-link:

https://virtocommerce.atlassian.net/browse/VCST-4632

Artifact URL:

https://vc3prerelease.blob.core.windows.net/packages/VirtoCommerce.XCatalog_3.946.0-pr-86-0806.zip


Note

Low Risk
Small null-safety fix in brand search; main risk is DI/registration mismatch due to the new ICatalogService dependency.

Overview
Fixes a null-reference scenario in SearchBrandQueryHandler when no brand categories are returned by resolving the catalog directly via a new ICatalogService fallback.

This updates the handler constructor to accept and store ICatalogService, then uses it to fetch the brands catalog when brandCategories.FirstOrDefault()?.Catalog is null.

Written by Cursor Bugbot for commit 08066f4. This will update automatically on new commits. Configure here.

@sonarqubecloud
Copy link

Copy link
Contributor

@vc-ci vc-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.543
Timestamp: 17-02-2026T13:09:51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants