mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-21 15:14:13 +00:00
LibWeb: Don't call an absent error callback in load_sync()
Make ResourceLoader::load_sync() match load() in checking if the error_callback is null before actually calling it. Fixes #1623.
This commit is contained in:
@@ -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);
|
||||
loop.quit(0);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user