Remove pointless NULL check in repaint_window()
The function has already dereferenced the pointer and passing NULL to this function is just a bug.
This commit is contained in:
@@ -1397,9 +1397,8 @@ int BX_is_cursor_in_display(Screen *screen)
|
|||||||
* If end_line is -1, then that means clear the display if any of it appears
|
* If end_line is -1, then that means clear the display if any of it appears
|
||||||
* after the end of the scrollback buffer.
|
* after the end of the scrollback buffer.
|
||||||
*/
|
*/
|
||||||
void BX_repaint_window (Window *w, int start_line, int end_line)
|
void BX_repaint_window (Window *window, int start_line, int end_line)
|
||||||
{
|
{
|
||||||
Window *window = (Window *)w;
|
|
||||||
Display *curr_line;
|
Display *curr_line;
|
||||||
int count;
|
int count;
|
||||||
int clean_display = 0;
|
int clean_display = 0;
|
||||||
@@ -1407,9 +1406,6 @@ void BX_repaint_window (Window *w, int start_line, int end_line)
|
|||||||
if (dumb_mode || !window->visible)
|
if (dumb_mode || !window->visible)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!window)
|
|
||||||
window = current_window;
|
|
||||||
|
|
||||||
if (end_line == -1)
|
if (end_line == -1)
|
||||||
{
|
{
|
||||||
end_line = window->display_size;
|
end_line = window->display_size;
|
||||||
|
|||||||
Reference in New Issue
Block a user