diff options
| author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2025-08-05 16:50:44 +0200 |
|---|---|---|
| committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2025-08-05 16:50:44 +0200 |
| commit | 47e005dce0d959811b668ce60e03a8ddba1b96d7 (patch) | |
| tree | ebf573362dde42d1b2849c4d72349f2f104654f9 | |
| parent | 18ab458cf5a1b9288eccf923ea96e3106bf5cb08 (diff) | |
| download | ayatana-indicator-datetime-47e005dce0d959811b668ce60e03a8ddba1b96d7.tar.gz ayatana-indicator-datetime-47e005dce0d959811b668ce60e03a8ddba1b96d7.tar.bz2 ayatana-indicator-datetime-47e005dce0d959811b668ce60e03a8ddba1b96d7.zip | |
src/date-time.cpp: Don't segfault-by-assert if m_dt is not initialized. Fixes syncing from Google Calendar where sometimes events in Evolution can result in incomplete DateTime objects.
| -rw-r--r-- | src/date-time.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/date-time.cpp b/src/date-time.cpp index 911fb7a..440c589 100644 --- a/src/date-time.cpp +++ b/src/date-time.cpp @@ -180,8 +180,10 @@ DateTime DateTime::add_days(int days) const GDateTime* DateTime::get() const { - g_assert(m_dt); - return m_dt.get(); + if (m_dt) { + return m_dt.get(); + } + return nullptr; } std::string DateTime::format(const std::string& fmt) const |
