From 945007b32e9a30252216398413bff88c103d8667 Mon Sep 17 00:00:00 2001 From: mano-wii Date: Wed, 2 Jan 2019 10:01:46 -0200 Subject: Fix T59773: Raise exception if the gpu module is used in backgound mode. Instead of crashing, an error message is displayed if a function of the gpu module is called without a GPU context. Reviewers: brecht, campbellbarton, JacquesLucke, mont29 Subscribers: abdelmatinboulbayam, amir.shehata Differential Revision: https://developer.blender.org/D4143 --- source/blender/gpu/GPU_init_exit.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/gpu/GPU_init_exit.h') diff --git a/source/blender/gpu/GPU_init_exit.h b/source/blender/gpu/GPU_init_exit.h index e89c970b7d9..8f1a42c8795 100644 --- a/source/blender/gpu/GPU_init_exit.h +++ b/source/blender/gpu/GPU_init_exit.h @@ -38,6 +38,7 @@ extern "C" { void GPU_init(void); void GPU_exit(void); +bool GPU_is_initialized(void); #ifdef __cplusplus } -- cgit v1.2.3