summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/intel/vulkan/anv_util.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/intel/vulkan/anv_util.c b/src/intel/vulkan/anv_util.c
index 6b31224d7f1..3c1803aa056 100644
--- a/src/intel/vulkan/anv_util.c
+++ b/src/intel/vulkan/anv_util.c
@@ -99,14 +99,16 @@ __vk_errorf(struct anv_instance *instance, const void *object,
snprintf(report, sizeof(report), "%s:%d: %s", file, line, error_str);
}
- vk_debug_report(&instance->debug_report_callbacks,
- VK_DEBUG_REPORT_ERROR_BIT_EXT,
- type,
- (uint64_t) (uintptr_t) object,
- line,
- 0,
- "anv",
- report);
+ if (instance) {
+ vk_debug_report(&instance->debug_report_callbacks,
+ VK_DEBUG_REPORT_ERROR_BIT_EXT,
+ type,
+ (uint64_t) (uintptr_t) object,
+ line,
+ 0,
+ "anv",
+ report);
+ }
intel_loge("%s", report);