Merge lp:~macslow/unity/unity.fix-850623 into lp:unity

Proposed by Mirco Müller
Status: Merged
Approved by: Gord Allott
Approved revision: no longer in the source branch.
Merged at revision: 1728
Proposed branch: lp:~macslow/unity/unity.fix-850623
Merge into: lp:unity
Diff against target: 25 lines (+4/-3)
1 file modified
plugins/unityshell/src/GeisAdapter.cpp (+4/-3)
To merge this branch: bzr merge lp:~macslow/unity/unity.fix-850623
Reviewer Review Type Date Requested Status
Gord Allott (community) Approve
Review via email: mp+80377@code.launchpad.net

Description of the change

_root_instance was never checked for NULL... not in unity and not in geis. Now it's at least checked in unity... should fix LP: #850623 (probably also LP: #849611)

To post a comment you must log in.
Revision history for this message
Gord Allott (gordallott) wrote :

On 25/10/11 15:27, Mirco Müller wrote:
> Mirco Müller has proposed merging lp:~macslow/unity/unity.fix-850623 into lp:unity.
>
> Requested reviews:
> Unity Team (unity-team)
>
> For more details, see:
> https://code.launchpad.net/~macslow/unity/unity.fix-850623/+merge/80377
>
> _root_instance was never checked for NULL... not in unity and not in geis. Now it's at least checked in unity... should fix LP: #850623 (probably also LP: #849611)

looks good to me, approving

 +1
 merge approved

--
Gordon Allott
Canonical Ltd.
27 Floor, Millbank Tower
London SW1P 4QP
www.canonical.com

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/GeisAdapter.cpp'
2--- plugins/unityshell/src/GeisAdapter.cpp 2011-09-26 11:58:50 +0000
3+++ plugins/unityshell/src/GeisAdapter.cpp 2011-10-25 19:26:23 +0000
4@@ -45,9 +45,10 @@
5 GeisAdapter::Run()
6 {
7 int fd = -1;
8- GeisStatus status;
9+ GeisStatus status = GEIS_STATUS_NOT_SUPPORTED;
10
11- status = geis_configuration_get_value(_root_instance, GEIS_CONFIG_UNIX_FD, &fd);
12+ if (_root_instance != nullptr)
13+ status = geis_configuration_get_value(_root_instance, GEIS_CONFIG_UNIX_FD, &fd);
14
15 if (status != GEIS_STATUS_SUCCESS)
16 return;
17@@ -466,7 +467,7 @@
18 GEIS_XCB_FULL_WINDOW,
19 &xcb_win_info
20 };
21- GeisInstance instance;
22+ GeisInstance instance = nullptr;
23
24 status = geis_init(&win_info, &instance);
25 if (status != GEIS_STATUS_SUCCESS)