mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
meta_window_move_frame(): fix crash when frame is NULL
When meta_frame_calc_borders() was made to take a NULL frame argument,
a crash was accidentally introduced into meta_window_move_frame().
This partially reverts 8c1b2d5
.
https://bugzilla.gnome.org/show_bug.cgi?id=675254
This commit is contained in:
parent
ba4f008d40
commit
c669a3892e
@ -5080,8 +5080,10 @@ meta_window_move_frame (MetaWindow *window,
|
|||||||
{
|
{
|
||||||
int x = root_x_nw;
|
int x = root_x_nw;
|
||||||
int y = root_y_nw;
|
int y = root_y_nw;
|
||||||
MetaFrameBorders borders;
|
|
||||||
|
|
||||||
|
if (window->frame)
|
||||||
|
{
|
||||||
|
MetaFrameBorders borders;
|
||||||
meta_frame_calc_borders (window->frame, &borders);
|
meta_frame_calc_borders (window->frame, &borders);
|
||||||
|
|
||||||
/* root_x_nw and root_y_nw correspond to where the top of
|
/* root_x_nw and root_y_nw correspond to where the top of
|
||||||
@ -5091,7 +5093,7 @@ meta_window_move_frame (MetaWindow *window,
|
|||||||
*/
|
*/
|
||||||
x += window->frame->child_x - borders.invisible.left;
|
x += window->frame->child_x - borders.invisible.left;
|
||||||
y += window->frame->child_y - borders.invisible.top;
|
y += window->frame->child_y - borders.invisible.top;
|
||||||
|
}
|
||||||
meta_window_move (window, user_op, x, y);
|
meta_window_move (window, user_op, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user