1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +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:
Igor Babaev
2016-03-30 12:43:57 -07:00
parent 2078392cc9
commit c9ff5cfbfd

View File

@ -319,6 +319,12 @@ int compare_window_frames(Window_frame *win_frame1,
if (win_frame1 == win_frame2)
return 0;
if (!win_frame1)
return 2;
if (!win_frame2)
return -2;
if (win_frame1->units != win_frame2->units)
return win_frame1->units > win_frame2->units ? -2 : 2;