aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/avatar_image.vala
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/avatar_image.vala')
-rw-r--r--main/src/ui/avatar_image.vala13
1 files changed, 9 insertions, 4 deletions
diff --git a/main/src/ui/avatar_image.vala b/main/src/ui/avatar_image.vala
index 6142b26e..107e421a 100644
--- a/main/src/ui/avatar_image.vala
+++ b/main/src/ui/avatar_image.vala
@@ -26,6 +26,13 @@ public class AvatarImage : Misc {
get_style_context().add_class("avatar");
}
+ public override void dispose() {
+ base.dispose();
+ drawer = null;
+ cached_surface = null;
+ disconnect_stream_interactor();
+ }
+
public override void get_preferred_width(out int minimum_width, out int natural_width) {
minimum_width = width;
natural_width = width;
@@ -50,6 +57,7 @@ public class AvatarImage : Misc {
if (cached_surface != null) {
ctx_in.set_source_surface(cached_surface, 0, 0);
ctx_in.paint();
+ ctx_in.set_source_rgb(0, 0, 0);
return true;
}
width *= scale_factor;
@@ -67,15 +75,12 @@ public class AvatarImage : Misc {
if (use_image_surface == 1) {
ctx_in.set_source_surface(ctx.get_target(), 0, 0);
ctx_in.paint();
+ ctx_in.set_source_rgb(0, 0, 0);
}
return true;
}
- public override void destroy() {
- disconnect_stream_interactor();
- }
-
private void disconnect_stream_interactor() {
if (stream_interactor != null) {
presence_manager.show_received.disconnect(on_show_received);