mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed a crash in compare_window_frames().
The function did not take into account the case when only one of of the pointers to the compared frames is NULL.
This commit is contained in:
@ -319,6 +319,12 @@ int compare_window_frames(Window_frame *win_frame1,
|
|||||||
if (win_frame1 == win_frame2)
|
if (win_frame1 == win_frame2)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (!win_frame1)
|
||||||
|
return 2;
|
||||||
|
|
||||||
|
if (!win_frame2)
|
||||||
|
return -2;
|
||||||
|
|
||||||
if (win_frame1->units != win_frame2->units)
|
if (win_frame1->units != win_frame2->units)
|
||||||
return win_frame1->units > win_frame2->units ? -2 : 2;
|
return win_frame1->units > win_frame2->units ? -2 : 2;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user