diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-02-09 16:37:51 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-02-09 19:57:41 +0000 |
commit | 6ed7a3cc51e560c6b2a6894f6829c0ac9f991ef2 (patch) | |
tree | a82a6ecad9163b383f9ec32276bb929ff519bbf3 /vcl | |
parent | 8620b204b51a9e0552a0002f7f06292bdfad37a7 (diff) |
tdf#153501 Fix OString construction from nullptr
(see recent 6028e9fda96d0ed5da266b1c54a7755f7ba3408c "Finally drop undocumented
rtl_[u]String_newFromStr null argument support")
Change-Id: Ib47d2d674487baf0414b4a02b27b2359f809df97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146719
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 6b8b65c4fbce..16945ee85dd7 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -7695,7 +7695,8 @@ public: GtkWidget* pPage = gtk_assistant_get_nth_page(m_pAssistant, nOldIndex); g_object_ref(pPage); - OString sTitle(gtk_assistant_get_page_title(m_pAssistant, pPage)); + auto const title = gtk_assistant_get_page_title(m_pAssistant, pPage); + OString sTitle(title == nullptr ? "" : title); gtk_assistant_remove_page(m_pAssistant, nOldIndex); gtk_assistant_insert_page(m_pAssistant, pPage, nNewIndex); gtk_assistant_set_page_type(m_pAssistant, pPage, GTK_ASSISTANT_PAGE_CUSTOM); |