summaryrefslogtreecommitdiff
path: root/wx+/popup_dlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wx+/popup_dlg.cpp')
-rw-r--r--wx+/popup_dlg.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/wx+/popup_dlg.cpp b/wx+/popup_dlg.cpp
index e05a4240..189343e9 100644
--- a/wx+/popup_dlg.cpp
+++ b/wx+/popup_dlg.cpp
@@ -121,9 +121,12 @@ public:
int maxWidth = 500;
int maxHeight = 400; //try to determine better value based on actual display resolution:
- int disPos = wxDisplay::GetFromWindow(parent); //window must be visible
+ if (parent)
+ {
+ const int disPos = wxDisplay::GetFromWindow(parent); //window must be visible
if (disPos != wxNOT_FOUND)
maxHeight = wxDisplay(disPos).GetClientArea().GetHeight() * 2 / 3;
+ }
assert(!cfg.textMain.empty() || !cfg.textDetail.empty());
if (!cfg.textMain.empty())
bgstack15