aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Config.cpp4
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);
}