diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-10-15 03:45:58 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-10-15 03:45:58 +0200 |
commit | c35d035e22822515545edc2587d0d29871fad01c (patch) | |
tree | c39a1c9f38918de9b715d5197b9c9c15368bf3c7 /src | |
parent | 82234b4454299e0472344d5cf71bd8f70586133e (diff) |
Make sure xft.dpi resource type is string
Diffstat (limited to 'src')
-rw-r--r-- | src/Config.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Config.cpp b/src/Config.cpp index ada2113..9c67723 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -28,9 +28,9 @@ namespace QuickMedia { if(resource_manager) { XrmDatabase db = XrmGetStringDatabase(resource_manager); if(db) { - char *type; + char *type = nullptr; XrmValue val; - if(XrmGetResource(db, "Xft.dpi", "*", &type, &val)) + if(XrmGetResource(db, "Xft.dpi", "*", &type, &val) && type && strcmp(type, "String") == 0) xft_dpi = strtol(val.addr, nullptr, 10); XrmDestroyDatabase(db); } |