aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-04-08 16:37:55 -0500
committerRobert Tari <robert@tari.in>2021-07-06 00:12:50 +0200
commit85f702d540c998b91f5004b9c9629faaacfc37bd (patch)
tree4984789e4f62dff9b7b30957f036b1c36c73f008 /src
parenteb62aed710d8cf44b3749696945f2155974b0a91 (diff)
downloadayatana-indicator-datetime-85f702d540c998b91f5004b9c9629faaacfc37bd.tar.gz
ayatana-indicator-datetime-85f702d540c998b91f5004b9c9629faaacfc37bd.tar.bz2
ayatana-indicator-datetime-85f702d540c998b91f5004b9c9629faaacfc37bd.zip
in timezone-timedated, check for error!=nullptr before passing it to g_error_matches()
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);