summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-11-21 11:48:43 +0000
committerVincent Sanders <vince@kyllikki.org>2014-11-21 11:48:43 +0000
commit3ff4846c1a7d1b85624f5c1ced2df8637b0bd1e3 (patch)
tree7ccaf71c89c158a9c1c7ce5bdceea6dcf4fc39ac /desktop
parent0f0c3b02d7b3aa4687376d9c4e92312d77aa42c2 (diff)
downloadnetsurf-3ff4846c1a7d1b85624f5c1ced2df8637b0bd1e3.tar.gz
netsurf-3ff4846c1a7d1b85624f5c1ced2df8637b0bd1e3.tar.bz2
Remove usage of browser private interfaces
The cocoa frontend was directly acessing browser internals instead of using the API. In the case of gui.m there was a check for the browser window not being root (browser->parent != NULL) . As gui windows can only ever be associated with the root brower window (i.e. its parent will always be NULL) this was completely redundant.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/browser.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index 5570d4279..195814c20 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -2568,6 +2568,10 @@ void browser_window_set_scale(struct browser_window *bw, float scale, bool all)
/* exported interface documented in desktop/browser.h */
float browser_window_get_scale(struct browser_window *bw)
{
+ if (bw == NULL) {
+ return 1.0;
+ }
+
return bw->scale;
}