From f8e6fdee828647bc5a6a1cc7627052a072a37dc6 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 20 Dec 2016 10:46:20 +0000 Subject: Fix crash introduced by previous commit. --- src/wx/content_sub_panel.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/wx/content_sub_panel.cc b/src/wx/content_sub_panel.cc index e9d082701..674b30369 100644 --- a/src/wx/content_sub_panel.cc +++ b/src/wx/content_sub_panel.cc @@ -68,10 +68,12 @@ ContentSubPanel::setup_refer_button (wxCheckBox* button, shared_ptr } /* XXX: more debugging */ - if (!s.IsEmpty()) { - dcp->film()->log()->log (String::compose ("setting tooltip to %1", wx_to_std (s)), LogEntry::TYPE_GENERAL); - } else { - dcp->film()->log()->log ("clearing tooltip", LogEntry::TYPE_GENERAL); + if (dcp) { + if (!s.IsEmpty()) { + dcp->film()->log()->log (String::compose ("setting tooltip to %1", wx_to_std (s)), LogEntry::TYPE_GENERAL); + } else { + dcp->film()->log()->log ("clearing tooltip", LogEntry::TYPE_GENERAL); + } } button->SetToolTip (s); -- cgit v1.2.3