mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 21:47:43 +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:
parent
26eeaef0a8
commit
b3c4514902
1 changed files with 2 additions and 1 deletions
|
@ -57,7 +57,8 @@ void ResourceLoader::load_sync(const URL& url, Function<void(const ByteBuffer&)>
|
||||||
loop.quit(0);
|
loop.quit(0);
|
||||||
},
|
},
|
||||||
[&](auto& string) {
|
[&](auto& string) {
|
||||||
error_callback(string);
|
if (error_callback)
|
||||||
|
error_callback(string);
|
||||||
loop.quit(0);
|
loop.quit(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue