From 35153b45814dcc844213951352f410b2fc13e2ad Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Mon, 13 Oct 2014 20:49:44 -0700 Subject: Fix crash with GTK+ 3.14 on launch Patch from Liam to check for undefined desktop during startup. ** (inkscape:57708): CRITICAL **: SPCanvas* sp_desktop_canvas(const SPDesktop*): assertion 'desktop != NULL' failed Fixes: https://bugs.launchpad.net/inkscape/+bug/1375085 Fixed bugs: - https://launchpad.net/bugs/1375085 (bzr r13611) --- src/ui/widget/selected-style.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ui/widget/selected-style.cpp') diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp index f01366e19..a575dd592 100644 --- a/src/ui/widget/selected-style.cpp +++ b/src/ui/widget/selected-style.cpp @@ -1199,7 +1199,9 @@ void SelectedStyle::on_opacity_menu (Gtk::Menu *menu) { menu->show_all(); } -void SelectedStyle::on_opacity_changed () { +void SelectedStyle::on_opacity_changed () +{ + g_return_if_fail(_desktop); // TODO this shouldn't happen! if (_opacity_blocked) return; _opacity_blocked = true; -- cgit v1.2.3