clutter: Move priv variable initialization after precondition checks
In case of misuse (e.g. passing NULL stage) this might result in crashes before the precondition checks managed to kick in. Move this priv variable initialization after these checks. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2099>
This commit is contained in:
parent
a840c039a0
commit
d51469ea2a
@ -3787,12 +3787,14 @@ ClutterGrab *
|
||||
clutter_stage_grab (ClutterStage *stage,
|
||||
ClutterActor *actor)
|
||||
{
|
||||
ClutterStagePrivate *priv = stage->priv;
|
||||
ClutterStagePrivate *priv;
|
||||
ClutterGrab *grab;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), NULL);
|
||||
g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), NULL);
|
||||
|
||||
priv = stage->priv;
|
||||
|
||||
if (!priv->topmost_grab)
|
||||
{
|
||||
ClutterMainContext *context;
|
||||
|
Loading…
Reference in New Issue
Block a user