diff options
author | zCubed3 <liamr2023@gmail.com> | 2022-10-27 13:52:38 -0700 |
---|---|---|
committer | zCubed3 <liamr2023@gmail.com> | 2022-10-27 15:45:21 -0700 |
commit | e7091d07cdd15f9ef3c0083a02532efa2866298c (patch) | |
tree | 0d7b252757913dd8074e6076a4e74cd48bd42fac /platform/windows | |
parent | 4dc2c8ae6fe954f8c5c6627803f0a087ee1a2488 (diff) |
Fix OS.get_video_adapter_driver_info crash
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/os_windows.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 5ca064e523..a8911788fe 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -311,6 +311,10 @@ String OS_Windows::get_version() const { } Vector<String> OS_Windows::get_video_adapter_driver_info() const { + if (RenderingServer::get_singleton()->get_rendering_device() == nullptr) { + return Vector<String>(); + } + REFCLSID clsid = CLSID_WbemLocator; // Unmarshaler CLSID REFIID uuid = IID_IWbemLocator; // Interface UUID IWbemLocator *wbemLocator = NULL; // to get the services |