[gnome-panel] libgnome-panel: avoid possible null pointer dereference
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] libgnome-panel: avoid possible null pointer dereference
- Date: Sat, 7 Mar 2020 19:28:44 +0000 (UTC)
commit ae9e7210da5d90f40aafbc7e142837c6f0ffdcb3
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Mar 7 20:39:04 2020 +0200
libgnome-panel: avoid possible null pointer dereference
libgnome-panel/gp-applet.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/libgnome-panel/gp-applet.c b/libgnome-panel/gp-applet.c
index f5f6347ca..d67b7197b 100644
--- a/libgnome-panel/gp-applet.c
+++ b/libgnome-panel/gp-applet.c
@@ -300,7 +300,10 @@ size_hints_changed (GpAppletPrivate *priv,
{
guint i;
- if ((!priv->size_hints && size_hints) || (priv->size_hints && !size_hints))
+ if (priv->size_hints == NULL && size_hints == NULL)
+ return FALSE;
+
+ if (priv->size_hints == NULL || size_hints == NULL)
return TRUE;
if (priv->size_hints->n_elements != n_elements)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]