Commit 0baeb865 authored by jan.koester's avatar jan.koester
Browse files

save against nullptr

parent 7c301401
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -706,6 +706,8 @@ void libhtmlpp::HtmlElement::insertChild(const Element& el){
}

void libhtmlpp::HtmlElement::appendChild(const libhtmlpp::Element* el){
    if(!el)
        return;
    if(_childElement){
        Element *prev=nullptr;

@@ -820,6 +822,8 @@ void libhtmlpp::HtmlElement::remove(libhtmlpp::Element* el){
namespace libhtmlpp {

    void _copy(libhtmlpp::Element *dest,const libhtmlpp::Element *src){
        if(!dest || !src)
            return;

        const libhtmlpp::Element* prev=nullptr;