diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2016-04-08 16:37:55 -0500 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-29 14:37:39 +0200 |
commit | 8b30701b2052c0ae30d585248bce41b6d6fb3985 (patch) | |
tree | 1aeb016d9c96ef8c071f5c5af06bddb5af754aad /src | |
parent | fc5d3e97e21ee13c24b3fc78cddc2d8db43d58bc (diff) | |
download | ayatana-indicator-datetime-8b30701b2052c0ae30d585248bce41b6d6fb3985.tar.gz ayatana-indicator-datetime-8b30701b2052c0ae30d585248bce41b6d6fb3985.tar.bz2 ayatana-indicator-datetime-8b30701b2052c0ae30d585248bce41b6d6fb3985.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.cpp | 4 |
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); |