Skip to content

Commit 19bfc3d

Browse files
vkarehraveit65
authored and
raveit65
committed
applets: Fix runtime error messages
1 parent ae885fb commit 19bfc3d

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

applets/notification_area/status-notifier/sn-item-v0.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ update (SnItemV0 *v0)
256256
if (!pixbuf){
257257
/*try to find icons specified by path and filename*/
258258
pixbuf = gdk_pixbuf_new_from_file(v0->icon_name, NULL);
259-
if (pixbuf){
259+
if (pixbuf && icon_size > 1) {
260260
/*An icon specified by path and filename may be the wrong size for the tray */
261261
pixbuf=gdk_pixbuf_scale_simple(pixbuf, icon_size-2, icon_size-2,GDK_INTERP_BILINEAR);
262262
}

applets/wncklet/workspace-switcher.c

+8-4
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ static void update_properties_for_wm(PagerData* pager)
120120
gtk_widget_show(pager->workspace_names_scroll);
121121
if (pager->display_workspaces_toggle)
122122
gtk_widget_show(pager->display_workspaces_toggle);
123-
g_object_set (pager->cell, "editable", TRUE, NULL);
123+
if (pager->cell)
124+
g_object_set (pager->cell, "editable", TRUE, NULL);
124125
break;
125126
case PAGER_WM_METACITY:
126127
if (pager->workspaces_frame)
@@ -131,7 +132,8 @@ static void update_properties_for_wm(PagerData* pager)
131132
gtk_widget_show(pager->workspace_names_scroll);
132133
if (pager->display_workspaces_toggle)
133134
gtk_widget_show(pager->display_workspaces_toggle);
134-
g_object_set (pager->cell, "editable", TRUE, NULL);
135+
if (pager->cell)
136+
g_object_set (pager->cell, "editable", TRUE, NULL);
135137
break;
136138
case PAGER_WM_I3:
137139
if (pager->workspaces_frame)
@@ -144,7 +146,8 @@ static void update_properties_for_wm(PagerData* pager)
144146
gtk_widget_hide(pager->workspace_names_scroll);
145147
if (pager->display_workspaces_toggle)
146148
gtk_widget_show(pager->display_workspaces_toggle);
147-
g_object_set (pager->cell, "editable", FALSE, NULL);
149+
if (pager->cell)
150+
g_object_set (pager->cell, "editable", FALSE, NULL);
148151
break;
149152
case PAGER_WM_COMPIZ:
150153
if (pager->workspaces_frame)
@@ -155,7 +158,8 @@ static void update_properties_for_wm(PagerData* pager)
155158
gtk_widget_hide(pager->workspace_names_scroll);
156159
if (pager->display_workspaces_toggle)
157160
gtk_widget_hide(pager->display_workspaces_toggle);
158-
g_object_set (pager->cell, "editable", FALSE, NULL);
161+
if (pager->cell)
162+
g_object_set (pager->cell, "editable", FALSE, NULL);
159163
break;
160164
case PAGER_WM_UNKNOWN:
161165
if (pager->workspaces_frame)

0 commit comments

Comments
 (0)