diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2011-06-27 22:59:17 +0200 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2011-06-27 22:59:17 +0200 |
commit | caafece2b452cbcb7f41672a3b4b76d64392e6da (patch) | |
tree | ea304adc8e2bbd189e7b8253fc987ca434e146ff /display.c | |
parent | 8f8050792fa4040615bcdac2aaae7e81f7122769 (diff) | |
download | powerdebug-caafece2b452cbcb7f41672a3b4b76d64392e6da.tar.gz |
fix segfault when no clock is available
When there is no clock available, we even register the display ops.
The 'enter' callbakc is set but not data is available int the row
private data which leads to a segfaults.
This patch fix this problem by not registering the ops if the pm
subsystem was not correctly initialized.
In the meantime, we have to erase the window when we are switching
from one window to another. We can say it is the "default" display
callback.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reported-by: Milo (Woogyom) Kim <woogyom.kim@gmail.com>
Diffstat (limited to 'display.c')
-rw-r--r-- | display.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -120,7 +120,10 @@ static int display_refresh(int win, bool read) if (windata[win].ops && windata[win].ops->display) return windata[win].ops->display(read); - return 0; + if (werase(main_win)) + return -1; + + return wrefresh(main_win); } int display_refresh_pad(int win) |