Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-09-30 13:28:43 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-30 13:28:43 +0400
commitb6ea073af2d244bcec186b5095dccad6ef972e73 (patch)
tree451e06a1f2f94ac955afe855d6d9750e4fa0378b /source/blender/freestyle
parent65233bc49e021e0d4609c61242a4005ed0aa133c (diff)
more fixes relating to [#36878], freestyle was only checking for NULL linestyles in some places.
Diffstat (limited to 'source/blender/freestyle')
-rw-r--r--source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index 8cb44d05b84..7dc218c74df 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -369,7 +369,7 @@ static void prepare(Main *bmain, Render *re, SceneRenderLayer *srl)
if (lineset->flags & FREESTYLE_LINESET_ENABLED) {
if (G.debug & G_DEBUG_FREESTYLE) {
cout << " " << layer_count+1 << ": " << lineset->name << " - " <<
- lineset->linestyle->id.name + 2 << endl;
+ (lineset->linestyle ? (lineset->linestyle->id.name + 2) : "<NULL>") << endl;
}
Text *text = create_lineset_handler(bmain, srl->name, lineset->name);
controller->InsertStyleModule(layer_count, lineset->name, text);
@@ -680,9 +680,11 @@ void FRS_paste_active_lineset(FreestyleConfig *config)
FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(config);
if (lineset) {
- lineset->linestyle->id.us--;
+ if (lineset->linestyle)
+ lineset->linestyle->id.us--;
lineset->linestyle = lineset_buffer.linestyle;
- lineset->linestyle->id.us++;
+ if (lineset->linestyle)
+ lineset->linestyle->id.us++;
lineset->flags = lineset_buffer.flags;
lineset->selection = lineset_buffer.selection;
lineset->qi = lineset_buffer.qi;
@@ -711,10 +713,10 @@ void FRS_delete_active_lineset(FreestyleConfig *config)
if (lineset) {
if (lineset->group) {
lineset->group->id.us--;
- lineset->group = NULL;
}
- lineset->linestyle->id.us--;
- lineset->linestyle = NULL;
+ if (lineset->linestyle) {
+ lineset->linestyle->id.us--;
+ }
BLI_remlink(&config->linesets, lineset);
MEM_freeN(lineset);
BKE_freestyle_lineset_set_active_index(config, 0);