diff options
Diffstat (limited to 'libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx')
-rw-r--r-- | libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx b/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx index 8d1b3eb67e10..520472f201e5 100644 --- a/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx @@ -367,6 +367,11 @@ void LOKDocViewSigHandlers::window(LOKDocView* pDocView, gchar* pPayload, gpoint { const unsigned nParentId = std::atoi(aRoot.get<std::string>("parentId").c_str()); GtkWindow* pDialog = gtv_application_window_get_child_window_by_id(window, nParentId); + if (!pDialog) + { + g_warning("no parent dialog (id: %d) for created child; is child a sidebar?", nParentId); + return; + } const std::string aPos = aRoot.get<std::string>("position"); std::vector<int> aPosPoints = GtvHelpers::split<int>(aPos, ", ", 2); gtv_lok_dialog_child_create(GTV_LOK_DIALOG(pDialog), nWinId, aPosPoints[0], aPosPoints[1], aSizePoints[0], aSizePoints[1]); |