File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33#include " zenkit-capi/DaedalusScript.h"
44#include " Internal.hh"
55
6+ #include < exception>
67#include < zenkit/addon/daedalus.hh>
78
89ZKC_LOADER (ZkDaedalusScript)
@@ -106,8 +107,9 @@ ZkDaedalusInstance* ZkDaedalusSymbol_getInstance(ZkDaedalusSymbol* slf) {
106107
107108 try {
108109 auto & instance = slf->get_instance ();
110+ if (instance == nullptr ) return nullptr ;
109111 return new ZkDaedalusInstance (instance);
110- } catch (std::runtime_error & e) {
112+ } catch (std::exception & e) {
111113 return nullptr ;
112114 }
113115}
@@ -193,6 +195,9 @@ ZkDaedalusDataType ZkDaedalusSymbol_getReturnType(ZkDaedalusSymbol const* slf) {
193195}
194196
195197ZKC_API ZkDaedalusInstanceType ZkDaedalusInstance_getType (ZkDaedalusInstance const * slf) {
198+ ZKC_TRACE_FN ();
199+ ZKC_CHECK_NULL (slf);
200+
196201 auto type = SLF->instance_type ();
197202
198203 if (type == &typeid (zenkit::IGuildValues)) return ZkDaedalusInstanceType_GuildValues;
You can’t perform that action at this time.
0 commit comments