[gnome-control-center] wwan: Return "No Error" if error is NULL



commit 1dccede9a7396ffb062a6eed8ec6b69f8ebde1f7
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Wed Jan 12 19:13:49 2022 +0530

    wwan: Return "No Error" if error is NULL

 panels/wwan/cc-wwan-errors-private.h | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/panels/wwan/cc-wwan-errors-private.h b/panels/wwan/cc-wwan-errors-private.h
index 076482d1f..15cc76ac0 100644
--- a/panels/wwan/cc-wwan-errors-private.h
+++ b/panels/wwan/cc-wwan-errors-private.h
@@ -87,6 +87,9 @@ static ErrorTable me_errors[] = {
 static inline const gchar *
 cc_wwan_error_get_message (GError *error)
 {
+  if (!error)
+    return _("No Error");
+
  if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
     return _("Action Cancelled");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]