summaryrefslogtreecommitdiff
path: root/atari/search.c
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2011-02-25 23:25:22 +0000
committerOle Loots <ole@monochrom.net>2011-02-25 23:25:22 +0000
commit66ed6d8867868c1ee00ac3956c712000aedc901f (patch)
tree452f451143f32a8e55b96b2ff685207c3b969ae5 /atari/search.c
parent0c992d61b93602c7f788992ec86a6bd19749e1c2 (diff)
downloadnetsurf-66ed6d8867868c1ee00ac3956c712000aedc901f.tar.gz
netsurf-66ed6d8867868c1ee00ac3956c712000aedc901f.tar.bz2
NULL check
svn path=/trunk/netsurf/; revision=11813
Diffstat (limited to 'atari/search.c')
-rw-r--r--atari/search.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/atari/search.c b/atari/search.c
index cca7adaf7..30f774c2c 100644
--- a/atari/search.c
+++ b/atari/search.c
@@ -58,7 +58,8 @@ void nsatari_search_set_status(bool found, void *p)
void nsatari_search_set_hourglass(bool active, void *p)
{
SEARCH_FORM_SESSION s = (SEARCH_FORM_SESSION)p;
- if( active )
+ LOG((""));
+ if( active && current != NULL )
gui_window_set_pointer(s->bw->window, GUI_POINTER_PROGRESS);
else
gui_window_set_pointer(s->bw->window, GUI_POINTER_DEFAULT);
@@ -112,7 +113,10 @@ static SEARCH_FORM_SESSION get_search_session(WINDOW * win)
static void destroy_search_session( SEARCH_FORM_SESSION s )
{
- free( s );
+ if( s != NULL ){
+ LOG((""));
+ free( s );
+ }
}
static int apply_form( WINDOW * win, struct s_search_form_state * s )
@@ -211,6 +215,7 @@ static void __CDECL evnt_cb_click( WINDOW *win, int index, int unused, void *unu
static void __CDECL evnt_close( WINDOW *win, short buff[8])
{
/* Free Search Contexts */
+ /* todo: destroy search context, if any? */
SEARCH_FORM_SESSION s = get_search_session(win);
if( s != NULL ){
destroy_search_session( s );
@@ -221,6 +226,7 @@ static void __CDECL evnt_close( WINDOW *win, short buff[8])
void search_destroy( struct gui_window * gw )
{
+ LOG(("search_destroy %p / %p", gw, current ));
if( current != NULL ){
ApplWrite( _AESapid, WM_CLOSED, current->formwind->handle, 0,0,0,0);
/* Handle Close event */
@@ -228,6 +234,7 @@ void search_destroy( struct gui_window * gw )
/* Handle Destroy Event */
EvntWindom( MU_MESAG );
}
+ LOG(("done"));
}
SEARCH_FORM_SESSION open_browser_search( struct gui_window * gw )