[GPU] Fix DG2 units tests with null users (#18455)

* [GPU] Fix DG2 units tests with null users

* [GPU] Fix DG2 units tests with null users
This commit is contained in:
Pavel Durandin authored and GitHub committed 2023-07-10 19:32:38 +04:00
1 parent 975ba2a92b
commit 75696f4545
1 file changed
+1 -1
@@ -1196,7 +1196,7 @@ format layout_optimizer::get_expected_format(quantize_node const& node) {
if (use_onednn_impls) {
auto& user = node.get_users().front();
if (user->get_preferred_input_fmt(user->get_dependency_index(node)) != format::any) {
if (user != nullptr && user->get_preferred_input_fmt(user->get_dependency_index(node)) != format::any) {
expected = user->get_preferred_input_fmt(user->get_dependency_index(node));
} else {
expected = format::any;