]> granicus.if.org Git - icinga2/commitdiff
Disallow casting "" to an Object
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 10 Aug 2016 09:14:33 +0000 (11:14 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 10 Aug 2016 09:14:33 +0000 (11:14 +0200)
fixes #12390

lib/base/value.hpp

index 96be16d9f77402c2af9eddf5aeb865e02564aeb0..3d12a262eda987c48774ac16a62f5bc6daa8117a 100644 (file)
@@ -144,7 +144,7 @@ public:
        template<typename T>
        operator intrusive_ptr<T>(void) const
        {
-               if (IsEmpty())
+               if (IsEmpty() && !IsString())
                        return intrusive_ptr<T>();
 
                if (!IsObject())