File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 3
3
#include " zenkit-capi/DaedalusScript.h"
4
4
#include " Internal.hh"
5
5
6
+ #include < exception>
6
7
#include < zenkit/addon/daedalus.hh>
7
8
8
9
ZKC_LOADER (ZkDaedalusScript)
@@ -106,8 +107,9 @@ ZkDaedalusInstance* ZkDaedalusSymbol_getInstance(ZkDaedalusSymbol* slf) {
106
107
107
108
try {
108
109
auto & instance = slf->get_instance ();
110
+ if (instance == nullptr ) return nullptr ;
109
111
return new ZkDaedalusInstance (instance);
110
- } catch (std::runtime_error & e) {
112
+ } catch (std::exception & e) {
111
113
return nullptr ;
112
114
}
113
115
}
@@ -193,6 +195,9 @@ ZkDaedalusDataType ZkDaedalusSymbol_getReturnType(ZkDaedalusSymbol const* slf) {
193
195
}
194
196
195
197
ZKC_API ZkDaedalusInstanceType ZkDaedalusInstance_getType (ZkDaedalusInstance const * slf) {
198
+ ZKC_TRACE_FN ();
199
+ ZKC_CHECK_NULL (slf);
200
+
196
201
auto type = SLF->instance_type ();
197
202
198
203
if (type == &typeid (zenkit::IGuildValues)) return ZkDaedalusInstanceType_GuildValues;
You can’t perform that action at this time.
0 commit comments