aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2012-01-28 17:17:38 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2012-01-28 17:17:38 +0100
commit54f745d9d2f48be543007716d9773033f2b62bac (patch)
tree5fee8c8970c53cc70ef930ff188fb45196ab405d /src
parentb2b34a8a570da1b0812230fe4e73fff1ac5cbd1f (diff)
make DilloHtml::loadImages() more readable
Diffstat (limited to 'src')
-rw-r--r--src/html.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/html.cc b/src/html.cc
index af6d22c4..6ae08f4a 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -642,12 +642,13 @@ void DilloHtml::loadImages (const DilloUrl *pattern)
const DilloUrl *requester = pattern ? NULL : this->page_url;
for (int i = 0; i < images->size(); i++) {
- if (images->get(i)->image) {
- if ((!pattern) || (!a_Url_cmp(images->get(i)->url, pattern))) {
- if (Html_load_image(bw, images->get(i)->url, requester,
- images->get(i)->image)) {
- a_Image_unref (images->get(i)->image);
- images->get(i)->image = NULL; // web owns it now
+ DilloHtmlImage *hi = images->get(i);
+
+ if (hi->image) {
+ if ((!pattern) || (!a_Url_cmp(hi->url, pattern))) {
+ if (Html_load_image(bw, hi->url, requester, hi->image)) {
+ a_Image_unref (hi->image);
+ hi->image = NULL; // web owns it now
}
}
}