Make ResourceLoader::load_sync() match load() in checking if the error_callback is null before actually calling it. Fixes #1623.
@@ -57,7 +57,8 @@ void ResourceLoader::load_sync(const URL& url, Function<void(const ByteBuffer&)>
loop.quit(0);
},
[&](auto& string) {
- error_callback(string);
+ if (error_callback)
+ error_callback(string);
});