From 3a575a4338c0562e2b7c4b0eff2c5f1cda7252e8 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Mon, 25 Sep 2023 12:42:06 -0400 Subject: [PATCH] 2023-09-25 Fred Gleason * Fixed a bug in rdairplay(1) and rdpanel(1) that could cause a segfault when switching user context. Signed-off-by: Fred Gleason --- ChangeLog | 3 +++ lib/rdsound_panel.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index aaa312e6..c60ab186 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24339,3 +24339,6 @@ * Incremented the package version to 4.0.2int1. 2023-08-09 Fred Gleason * Incremented the package version to 4.1.0. +2023-09-25 Fred Gleason + * Fixed a bug in rdairplay(1) and rdpanel(1) that could cause a + segfault when switching user context. diff --git a/lib/rdsound_panel.cpp b/lib/rdsound_panel.cpp index df806f2f..1658ed64 100644 --- a/lib/rdsound_panel.cpp +++ b/lib/rdsound_panel.cpp @@ -918,7 +918,9 @@ void RDSoundPanel::UpdateButtonViewport() for(int i=0;ipanelButton(i,j); - button->setVisible(viewport.contains(button->geometry())); + if(panel!=NULL) { + button->setVisible(viewport.contains(button->geometry())); + } } } }