Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:mkubecek:fun
colord-gtk
trivial-Do-not-assume-cd_device_get_default_pro...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File trivial-Do-not-assume-cd_device_get_default_profile-.patch of Package colord-gtk
From: Richard Hughes <richard@hughsie.com> Date: Sat, 24 Jun 2023 20:32:01 +0100 Subject: trivial: Do not assume cd_device_get_default_profile() always returns a profile Patch-mainline: 0.4.0? Git-commit: 46643db6d136b30c33cdcc8ac67a3f0823d96818 References: https://github.com/hughsie/colord-gtk/issues/22 --- libcolord-gtk/cd-window.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/libcolord-gtk/cd-window.c +++ b/libcolord-gtk/cd-window.c @@ -309,13 +309,13 @@ cd_window_device_changed_cb (CdClient *client, CdDevice *device, CdWindow *windo /* get new default profile */ profile = cd_device_get_default_profile (window->priv->device); - if (cd_profile_equal (profile, window->priv->profile)) + if (profile == NULL && window->priv->profile == NULL) + return; + if (profile != NULL && cd_profile_equal (profile, window->priv->profile)) return; /* replace profile instance and emit if changed */ - if (window->priv->profile != NULL) - g_object_unref (window->priv->profile); - window->priv->profile = g_object_ref (profile); + g_set_object(&window->priv->profile, profile); g_signal_emit (window, signals[SIGNAL_CHANGED], 0, window->priv->profile); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor