diff options
| author | [email protected] <[email protected]> | 2011-12-07 06:52:32 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2011-12-07 06:52:32 +0000 |
| commit | 57e2947cfc180e3b098c0d161bd9fdbdcf0218c0 (patch) | |
| tree | c291705f920c1c19a6239e4e72f7f4aa03b08d21 /components/rtgui | |
| parent | bcb7a3f67b5e85494df59e43bf2ddb0f0061fcdf (diff) | |
rtgui/widgets/window.c: check null reference on rtgui_container.focused
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1829 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/rtgui')
| -rw-r--r-- | components/rtgui/widgets/window.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/rtgui/widgets/window.c b/components/rtgui/widgets/window.c index 7edba22a82..c1df9379ff 100644 --- a/components/rtgui/widgets/window.c +++ b/components/rtgui/widgets/window.c @@ -518,7 +518,8 @@ rt_bool_t rtgui_win_event_handler(struct rtgui_widget* widget, struct rtgui_even if (win->modal_widget != RT_NULL) return win->modal_widget->event_handler(win->modal_widget, event); } - else if (RTGUI_CONTAINER(win)->focused != widget) + else if (RTGUI_CONTAINER(win)->focused != widget && + RTGUI_CONTAINER(win)->focused != RT_NULL) { RTGUI_CONTAINER(win)->focused->event_handler(RTGUI_CONTAINER(win)->focused, event); } |
