changeset 3888:9928f9cba2e4

[gaim-migrate @ 4040] fix some runtime gtk warnings about the use of gtk_widget_set_sensitive() without a valid widget. (thanks dindinx) committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 03 Nov 2002 17:13:41 +0000
parents 17a165a610f8
children 811329c423ca
files src/conversation.c
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Sun Nov 03 16:07:12 2002 +0000
+++ b/src/conversation.c	Sun Nov 03 17:13:41 2002 +0000
@@ -2521,12 +2521,17 @@
 		else
 			gtk_widget_set_sensitive(c->send, TRUE);
 		if (c->gc->prpl->options & OPT_PROTO_IM_IMAGE) {
-			gtk_widget_set_sensitive(c->imagebtn, TRUE);
-			gtk_widget_set_sensitive(c->image_menubtn, TRUE);
+			if (c->imagebtn)
+				gtk_widget_set_sensitive(c->imagebtn, TRUE);
+			if (c->image_menubtn)
+				gtk_widget_set_sensitive(c->image_menubtn, TRUE);
 		}
 		else {
-			gtk_widget_set_sensitive(c->image_menubtn, FALSE);
-			gtk_widget_set_sensitive(c->imagebtn, FALSE);
+			
+			if (c->image_menubtn)
+				gtk_widget_set_sensitive(c->image_menubtn, FALSE);
+			if (c->imagebtn)
+				gtk_widget_set_sensitive(c->imagebtn, FALSE);
 		}
 	}