TimeView: fix direct messaging to another window
The window may be gone (if its B_QUIT_REQUESTED was called before the main Deskbar window one), so we can't safely call Quit() on it. Instead, just send a B_QUIT_REQUESTED through the BMessenger, which is a bit safer. Should fix #16026. Change-Id: I4c99c3a7f994044c3c3f0c08b35ae451c3ff9ea7 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2721 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
d9ef4f90bb
commit
54bff8ec82
@@ -110,8 +110,8 @@ TTimeView::TTimeView(BMessage* data)
|
||||
|
||||
TTimeView::~TTimeView()
|
||||
{
|
||||
if (fCalendarWindow != NULL)
|
||||
fCalendarWindow->Quit();
|
||||
if (fCalendarWindowMessenger.IsValid())
|
||||
fCalendarWindowMessenger.PostMessage(B_QUIT_REQUESTED);
|
||||
|
||||
delete fTimeFormat;
|
||||
delete fDateFormat;
|
||||
|
||||
Reference in New Issue
Block a user