[gnome-maps] Fix crash on failed search
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] Fix crash on failed search
- Date: Thu, 28 Mar 2013 01:12:27 +0000 (UTC)
commit c751242e58484c59fdf0f85441a28d739ef2c020
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Mar 28 03:09:22 2013 +0200
Fix crash on failed search
Thanks to Fabiano FidĂȘncio <fabiano fidencio org> for pointing this out.
src/mainToolbar.js | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index 0fea279..3333360 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -54,6 +54,7 @@ const MainToolbar = new Lang.Class({
_onSearchActivate: function() {
let str = this._entry.get_text();
let forward = Geocode.Forward.new_for_string(str);
+ forward._searchStr = str;
this._markerLayer.remove_all();
@@ -66,7 +67,8 @@ const MainToolbar = new Lang.Class({
try {
locations = forward.search_finish(res);
} catch (e) {
- log ("Failed to search '" + str + "': " + e.message);
+ let str = forward.get_data ("string");
+ log ("Failed to search '" + forward._searchStr + "': " + e.message);
return;
}
log (locations.length + " locations found");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]