X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcategory.cpp;fp=source%2Fcategory.cpp;h=0f6eb3f57e962ab0021b7b238aabff1a2470b571;hb=eac6a71e79797e6d37b620a91acb3c0541f1c07e;hp=5e454bb9dc7af7dcef5843efa9b4a3b96761404c;hpb=694d2890065b1555a01a81994cb80f106ca577ee;p=poefilter.git diff --git a/source/category.cpp b/source/category.cpp index 5e454bb..0f6eb3f 100644 --- a/source/category.cpp +++ b/source/category.cpp @@ -49,8 +49,12 @@ void Category::create_statements(list &st) const if(condition) { Condition *flat = condition->flatten(); - flat->add_lines(st); - delete flat; + if(flat) + { + flat->add_lines(st); + delete flat; + } + // TODO handle the case of the entire condition being non-viable } }