mirror of
https://github.com/godotengine/godot
synced 2024-09-04 21:48:31 +00:00
Check DBus loading status before attempting to detect its version
Fixes two related segfaults caused by running the DBus version check unconditionally and potentially calling null function pointers. This was clearly an oversight as all the other wrappers have proper loading status checks.
This commit is contained in:
parent
fd4a06c515
commit
a7542070ae
|
@ -138,6 +138,11 @@ FreeDesktopPortalDesktop::FreeDesktopPortalDesktop() {
|
|||
#else
|
||||
unsupported = false;
|
||||
#endif
|
||||
|
||||
if (unsupported) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool ver_ok = false;
|
||||
int version_major = 0;
|
||||
int version_minor = 0;
|
||||
|
|
|
@ -141,6 +141,11 @@ FreeDesktopScreenSaver::FreeDesktopScreenSaver() {
|
|||
#else
|
||||
unsupported = false;
|
||||
#endif
|
||||
|
||||
if (unsupported) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool ver_ok = false;
|
||||
int version_major = 0;
|
||||
int version_minor = 0;
|
||||
|
|
Loading…
Reference in a new issue