[Xfce4-commits] <xfce4-panel:nick/gtk3> PanelWindow: check if pointer is not NULL before using it.
Andrzej
noreply at xfce.org
Mon Apr 22 20:42:02 CEST 2013
Updating branch refs/heads/nick/gtk3
to faeec3e2ef5ae442b2d8ccfb00df57636933dd43 (commit)
from 12b3281bad85f5d9bffeae8faf592f674af24026 (commit)
commit faeec3e2ef5ae442b2d8ccfb00df57636933dd43
Author: Andrzej <ndrwrdck at gmail.com>
Date: Mon Apr 22 19:39:32 2013 +0100
PanelWindow: check if pointer is not NULL before using it.
panel/panel-window.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/panel/panel-window.c b/panel/panel-window.c
index 62c912f..73f8cc9 100644
--- a/panel/panel-window.c
+++ b/panel/panel-window.c
@@ -1192,8 +1192,11 @@ panel_window_get_preferred_width (GtkWidget *widget,
n_width = CLAMP (n_width, length, window->area.width);
}
- *minimum_width = m_width;
- *natural_width = n_width;
+ if (minimum_width != NULL)
+ *minimum_width = m_width;
+
+ if (natural_width != NULL)
+ *natural_width = n_width;
}
@@ -1244,8 +1247,11 @@ panel_window_get_preferred_height (GtkWidget *widget,
n_height = CLAMP (n_height, length, window->area.height);
}
- *minimum_height = m_height;
- *natural_height = n_height;
+ if (minimum_height != NULL)
+ *minimum_height = m_height;
+
+ if (natural_height != NULL)
+ *natural_height = n_height;
}
More information about the Xfce4-commits
mailing list