From f3e6d16ac75e7d1808cd49f6bbd4066dcb63ec29 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Fri, 2 Sep 2011 13:44:24 +0200 Subject: Extensions. Fix for a potential crasher in the extension scripts. (bzr r10611) --- 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 cac67844f..e4d850e5f 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -736,7 +736,7 @@ void Script::effect(Inkscape::Extension::Effect *module, SPNamedView *nv = (SPNamedView *) obj; //Check if it has a default layer set up - if ( nv->default_layer_id != 0 ) { + 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)); -- cgit v1.2.3