Skip to content

Commit 52db7d3

Browse files
committed
Bug 586768 - Incubator qt embedding: QMozView crashes if QMozApp is inited before. r=mark.finkle
1 parent 15a4c46 commit 52db7d3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

common/EmbeddingSetup.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* Pelle Johnsen <[email protected]>
2323
* Dave Camp <[email protected]>
2424
* Tobias Hunger <[email protected]>
25+
* Tatiana Meshkova <[email protected]>
2526
*
2627
* Alternatively, the contents of this file may be used under the terms of
2728
* either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -246,8 +247,9 @@ nsresult InitEmbedding(const char* aProfilePath)
246247
}
247248

248249
// setup profile dir
249-
if (aProfilePath) {
250-
rv = NS_NewNativeLocalFile(nsCString(aProfilePath), PR_FALSE,
250+
nsCString pr(aProfilePath);
251+
if (!pr.IsEmpty()) {
252+
rv = NS_NewNativeLocalFile(pr, PR_FALSE,
251253
getter_AddRefs(sProfileDir));
252254
NS_ENSURE_SUCCESS(rv, rv);
253255
} else {

qt/QMozApp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* Pelle Johnsen <[email protected]>
2323
* Tobias Hunger <[email protected]>
2424
* Steffen Imhof <[email protected]>
25+
* Tatiana Meshkova <[email protected]>
2526
*
2627
* Alternatively, the contents of this file may be used under the terms of
2728
* either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -49,7 +50,7 @@ class QMozApp::Private
4950
};
5051

5152
QMozApp::QMozApp(const QString& profilePath) :
52-
mPrivate(new Private(profilePath.toUtf8()))
53+
mPrivate(new Private(profilePath.toUtf8().data()))
5354
{
5455
}
5556

0 commit comments

Comments
 (0)