X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcategory.cpp;h=0f6eb3f57e962ab0021b7b238aabff1a2470b571;hb=7db8b8a0a7561bb8b26ec78f89b408c91cba1878;hp=5e454bb9dc7af7dcef5843efa9b4a3b96761404c;hpb=8b9d1f472e7bfbb1e097bb6d8bcad026e9636822;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 } }