From 019c87b20cd0b9c85268afaf389d7380b4dbce3c Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sat, 28 Apr 2012 16:49:30 +0100 Subject: gtkmm-3.0 fixes for Gtk::Box and header inclusions (bzr r11304) --- src/extension/implementation/script.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/extension/implementation/script.cpp') diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index d7dd641b0..7db036477 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -851,7 +851,7 @@ void Script::checkStderr (const Glib::ustring &data, GtkWidget *dlg = GTK_WIDGET(warning.gobj()); sp_transientize(dlg); - Gtk::VBox * vbox = warning.get_vbox(); + Gtk::Box * vbox = warning.get_vbox(); /* Gtk::TextView * textview = new Gtk::TextView(Gtk::TextBuffer::create()); */ Gtk::TextView * textview = new Gtk::TextView(); -- cgit v1.2.3 From c5d39b714d9d5f79442a4632eef9a8db54b0f7d5 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Thu, 3 May 2012 18:58:21 +0200 Subject: Syntax of null pointer dereference checking (bzr r11320) --- src/extension/implementation/script.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/extension/implementation/script.cpp') diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index 7db036477..432b25bb9 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -738,10 +738,12 @@ void Script::effect(Inkscape::Extension::Effect *module, SPNamedView *nv = (SPNamedView *) obj; //Check if it has a default layer set up - if ( nv != NULL and nv->default_layer_id != 0 ) { - SPDocument *document = desktop->doc(); - //If so, get that layer - layer = document->getObjectById(g_quark_to_string(nv->default_layer_id)); + if ( nv != NULL){ + if( nv->default_layer_id != 0 ) { + SPDocument *document = desktop->doc(); + //If so, get that layer + layer = document->getObjectById(g_quark_to_string(nv->default_layer_id)); + } } sp_namedview_update_layers_from_document(desktop); -- cgit v1.2.3