From 318b9e520ac28174f7b2c360cb6f5f3a0a5e8cd4 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 24 Jan 2006 17:26:39 +0000 Subject: [PATCH] prevent reentrant locks --- panda/src/display/displayRegion.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/panda/src/display/displayRegion.cxx b/panda/src/display/displayRegion.cxx index b97453d0c2..a50d1dea2f 100644 --- a/panda/src/display/displayRegion.cxx +++ b/panda/src/display/displayRegion.cxx @@ -197,9 +197,8 @@ set_dimensions(float l, float r, float b, float t) { _b = b; _t = t; - const GraphicsOutput *win = get_window(); - if (win != (GraphicsOutput *)NULL && win->has_size()) { - do_compute_pixels(win->get_x_size(), win->get_y_size()); + if (_window != (GraphicsOutput *)NULL && _window->has_size()) { + do_compute_pixels(_window->get_x_size(), _window->get_y_size()); } } @@ -319,11 +318,9 @@ set_sort(int sort) { //////////////////////////////////////////////////////////////////// void DisplayRegion:: compute_pixels() { - const GraphicsOutput *win = get_window(); - if (win != (GraphicsOutput *)NULL) { - MutexHolder holder(_lock); - - do_compute_pixels(win->get_x_size(), win->get_y_size()); + MutexHolder holder(_lock); + if (_window != (GraphicsOutput *)NULL) { + do_compute_pixels(_window->get_x_size(), _window->get_y_size()); } }