--- a/gntbox.c Sun Feb 23 02:40:51 2014 +0530
+++ b/gntbox.c Mon Apr 07 20:02:22 2014 +0530
@@ -731,6 +731,11 @@
+ if (G_UNLIKELY(w == NULL)) { if (GNT_WIDGET_IS_FLAG_SET(w, GNT_WIDGET_INVISIBLE))
@@ -819,6 +824,12 @@
for (iter = box->list; iter; iter = iter->next)
GntWidget *w = iter->data;
+ if (G_UNLIKELY(w == NULL)) { gnt_box_readjust(GNT_BOX(w));
--- a/gntmain.c Sun Feb 23 02:40:51 2014 +0530
+++ b/gntmain.c Mon Apr 07 20:02:22 2014 +0530
@@ -469,6 +469,7 @@
if (locale && (strstr(locale, "UTF") || strstr(locale, "utf"))) {
--- a/gntmenu.c Sun Feb 23 02:40:51 2014 +0530
+++ b/gntmenu.c Mon Apr 07 20:02:22 2014 +0530
@@ -121,6 +121,8 @@
char trigger[4] = "\0 )\0";
+ g_return_if_fail(item != NULL); if ((trigger[1] = gnt_menuitem_get_trigger(item)) && trigger[1] != ' ')
--- a/gnttextview.c Sun Feb 23 02:40:51 2014 +0530
+++ b/gnttextview.c Mon Apr 07 20:02:22 2014 +0530
@@ -335,7 +335,13 @@
GntTextView *view = GNT_TEXT_VIEW(widget);
if (text_view_contains(view, select_start)) {
+ g_return_val_if_fail(select_start != NULL, TRUE); select_end = gnt_text_view_get_p(view, x - widget->priv.x, y - widget->priv.y);
+ g_return_val_if_fail(select_end != NULL, TRUE); if (select_end < select_start) {
select_start = select_end;
@@ -758,6 +764,12 @@
GntTextLine *line = iter->data;
+ if (G_UNLIKELY(line == NULL)) { for (segs = line->segments; segs; segs = snext) {
GntTextSegment *seg = segs->data;
@@ -771,6 +783,10 @@
/* This segment starts in the middle of the tag */
free_text_segment(seg, NULL);
+ if (G_UNLIKELY(line == NULL)) { line->segments = g_list_delete_link(line->segments, segs);
if (line->segments == NULL) {
free_text_line(line, NULL);
--- a/gnttree.c Sun Feb 23 02:40:51 2014 +0530
+++ b/gnttree.c Mon Apr 07 20:02:22 2014 +0530
@@ -1314,7 +1314,8 @@
- s->prev = row; /* s cannot be NULL */
+ g_return_if_fail(s != NULL); /* s cannot be NULL */ newp = g_list_index(tree->list, s) - 1;
--- a/gntwm.c Sun Feb 23 02:40:51 2014 +0530
+++ b/gntwm.c Mon Apr 07 20:02:22 2014 +0530
@@ -2251,8 +2251,14 @@
void gnt_wm_raise_window(GntWM *wm, GntWidget *widget)
GntWS *ws = gnt_wm_widget_find_workspace(wm, widget);
+ g_return_if_fail(wm != NULL); gnt_wm_switch_workspace(wm, g_list_index(wm->workspaces, ws));
+ g_return_if_fail(wm->cws != NULL); if (widget != wm->cws->ordered->data) {
GntWidget *wid = wm->cws->ordered->data;
wm->cws->ordered = g_list_bring_to_front(wm->cws->ordered, widget);
--- a/wms/irssi.c Sun Feb 23 02:40:51 2014 +0530
+++ b/wms/irssi.c Mon Apr 07 20:02:22 2014 +0530
@@ -155,6 +155,9 @@
+ g_return_if_fail(win != NULL); + g_return_if_fail(wm != NULL); name = gnt_widget_get_name(win);
if (!name || !strstr(name, "conversation-window")) {
if (!GNT_IS_MENU(win) && !GNT_WIDGET_IS_FLAG_SET(win, GNT_WIDGET_TRANSIENT)) {
--- a/wms/s.c Sun Feb 23 02:40:51 2014 +0530
+++ b/wms/s.c Mon Apr 07 20:02:22 2014 +0530
@@ -84,6 +84,9 @@
+ g_return_if_fail(win != NULL); + g_return_if_fail(wm != NULL); getmaxyx(stdscr, maxy, maxx);