aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/timezone-timedated.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timezone-timedated.cpp b/src/timezone-timedated.cpp
index 9254612..e123531 100644
--- a/src/timezone-timedated.cpp
+++ b/src/timezone-timedated.cpp
@@ -171,12 +171,12 @@ private:
{
GError* error {};
GVariant* v = g_dbus_connection_call_finish(G_DBUS_CONNECTION(connection), res, &error);
- if (v == nullptr)
+ if (error != nullptr)
{
if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
g_warning("%s Couldn't get timezone: %s", G_STRLOC, error->message);
}
- else
+ else if (v != nullptr)
{
GVariant* tzv {};
g_variant_get(v, "(v)", &tzv);