From 103b04e529259a0b185501d7dbc18f24c3d81a7e Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Wed, 24 Aug 2016 18:12:42 +0200 Subject: [PATCH] DocData: Fix null reference not detected correctly (cherry picked from commit b81725b203cfceefd8577cf2ec4ca9dd0d618869) --- tools/doc/doc_data.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp index ce69aca0c68..479b99a03dc 100644 --- a/tools/doc/doc_data.cpp +++ b/tools/doc/doc_data.cpp @@ -296,6 +296,10 @@ void DocData::generate(bool p_basic_types) { default_arg_text=Variant::get_type_name(default_arg.get_type())+default_arg_text; break; case Variant::OBJECT: + if (default_arg.is_zero()) { + default_arg_text="NULL"; + break; + } case Variant::INPUT_EVENT: case Variant::DICTIONARY: // 20 case Variant::ARRAY: