From 9427fdaed16865a764a6560746866854a0979a9f Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Mon, 10 Apr 2006 10:50:32 +0000
Subject: [PATCH] don't compute bw avatar if no avatar. Fixes #1839

---
 src/gajim.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gajim.py b/src/gajim.py
index c49550f553..18dbaf8f6a 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -1076,12 +1076,12 @@ class Interface:
 		if pixbuf:
 			path_to_normal_file = path_to_file + '_notif_size_colored.png'
 			pixbuf.save(path_to_normal_file, 'png')
-		# Generate and save the resized, black and white avatar
-		bwbuf = gtkgui_helpers.get_scaled_pixbuf(
-			gtkgui_helpers.make_pixbuf_grayscale(pixbuf), 'notification')
-		if bwbuf:
-			path_to_bw_file = path_to_file + '_notif_size_bw.png'
-			bwbuf.save(path_to_bw_file, 'png')
+			# Generate and save the resized, black and white avatar
+			bwbuf = gtkgui_helpers.get_scaled_pixbuf(
+				gtkgui_helpers.make_pixbuf_grayscale(pixbuf), 'notification')
+			if bwbuf:
+				path_to_bw_file = path_to_file + '_notif_size_bw.png'
+				bwbuf.save(path_to_bw_file, 'png')
 
 	def add_event(self, account, jid, typ, args):
 		'''add an event to the awaiting_events var'''
-- 
GitLab