From 3ff4846c1a7d1b85624f5c1ced2df8637b0bd1e3 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 21 Nov 2014 11:48:43 +0000 Subject: 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. --- desktop/browser.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'desktop/browser.c') 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; } -- cgit v1.2.3