summaryrefslogtreecommitdiff
path: root/qt4
diff options
context:
space:
mode:
authorPino Toscano <pino@kde.org>2009-06-28 20:11:42 +0200
committerPino Toscano <pino@kde.org>2009-06-28 20:11:42 +0200
commite1e9ae2826eff1665d798b4b50b5c63e8282246b (patch)
tree5403b73dbafe8d7a82ca96a435079f28a61db000 /qt4
parenta98de97137cb343182bd03c443fc08ff4e0fd9a5 (diff)
[Qt4 demo] do not crash when changing the zoom with no document
Diffstat (limited to 'qt4')
-rw-r--r--qt4/demos/pageview.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt4/demos/pageview.cpp b/qt4/demos/pageview.cpp
index 3c22ab44..d7749985 100644
--- a/qt4/demos/pageview.cpp
+++ b/qt4/demos/pageview.cpp
@@ -67,6 +67,9 @@ void PageView::pageChanged(int page)
void PageView::slotZoomChanged(qreal value)
{
m_zoom = value;
+ if (!document()) {
+ return;
+ }
reloadPage();
}