From e70dfbe3e07ce932b09a70d549300bba38175a53 Mon Sep 17 00:00:00 2001 From: Charlie Brej Date: Mon, 22 Mar 2010 22:41:17 +0000 Subject: [PATCH] [script] Return NULL when requesting width of nonexistent window Minor bug, previously would return the index used rather than a NULL. Would only cause problems when using a width request as a test of the presence of a window. --- src/plugins/splash/script/script-lib-sprite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/splash/script/script-lib-sprite.c b/src/plugins/splash/script/script-lib-sprite.c index 8185d7d7..c3923995 100644 --- a/src/plugins/splash/script/script-lib-sprite.c +++ b/src/plugins/splash/script/script-lib-sprite.c @@ -222,7 +222,7 @@ static script_return_t sprite_window_get_width (script_state_t *state, node = ply_list_get_nth_node (data->displays, index); if (node == NULL) - return script_return_obj (script_obj_new_number (index)); + return script_return_obj_null (); display = ply_list_node_get_data (node); width = ply_pixel_display_get_width (display->pixel_display); return script_return_obj (script_obj_new_number (width)); -- 2.47.3